HOW CAN I CHECK A VARIABLE OR CONSTANT VALUE??
-
Hi:
I,m trying to check a variable/constant value like this:
IF MyVariable == VALUE THEN
connect to Block A
ELSE
connect to Block BI'm trying with predefined "Condition Block", but no luck...
Thanks in advance.
-
In theory it should work. Example or picture?
-
Both, please...

If I'm a variable "onlyEuropeanSession = true" set. I want to do:
IF onlyEuropeanSession == true THEN
connect to ONLYEUROPEANSESSION BLOCK
ELSE
connect to ALLSESSIONS BLOCK.Thanks in advance.
-
My idea was you to give me idea of what you have made, but nevermind

https://fxdreema.com/shared/qvqU9jXhb
I checked this here with boolean constant, which equals to true. In the condition I compare it to boolean true, and it works. Even if I actually added the constant as a numeric value on the left side.So, out of this example you should see many horizontal lines. If you change the constant to false there will be vertical lines. If this is what you ask for of course...
If you don't get this result, check input parameters, because MT does cache of these and sometimes when you change some input parameter (constant or variable) in fxDreema (or MetaEditor) this does not take effect until you manually clear the cache .ini file.
Or... give me some picture or something that can help me see what is going on on your side
I checked your web profile and it's empty there, so you probably work on the local version where I can't see. -
Ok. Thanks.
I think "Numeric" in left operand is key.
-
Yes, there are many data types, but from all of them only string is unique. All the others are basically integer, which is a whole number. Integer can be used with double (floating number), with boolean (0 or 1). In some situation even string can be used as integer

In the case yes, you can compate 0 with false and 1 with true.