Boolean(Logical) Expressions

First of all, logical expressions, these kinds of expressions only have true or false results. For example, if you have a logical expression like EX1.

EX1: RSI1>70 AND MA1>MA2

The logical value of this expression will be true or false. And you can use this true or false result, for example, to determine if the expert should enter a position or not or something must have started or not.

Also, some keywords have been supported here like, “CROSSUP”. For example:


This means if MA1 crosses MA2 upward, the value of this expression is true and if not, the value will be false.

You can use parentheses to determine priorities in compiling composite and complicated expressions like EX3.


Keep in mind that inside the parentheses has always the top priority to be calculated first.

If you create an indicator and name it MACD1, and you want to refer to the signal line you can put colon character in front of MACD1, and then write the word signal in front of the character. You also can do the same for the mainline as you see in EX4.


For mathematical functions, like absolute value, LOG, trigonometric functions, exponents and … you can use all of them for example EX5.


notation: “MathSQRT[MA1-MA2]” is for measuring the distance between MA1 and MA2; and as you see you can also use the word “pips” easily.

There are a series of keywords like “Spread”, “Ask”, “Bid” which you can use as instant or real-time for spread value, ask price or bid price. As you can see in EX6.

EX6: Spread<12Points AND MA1>Ask

If you have defined an indicator namely MA1 and you have a shift for it, you can put a number in a pair of brackets that it determines the shift number. As you see in EX7.

Ex7: MA1[1] > MA1[26]

You can also refer to four parameters of any candle, open, close, high, low. By using them in the expressions as shown in EX8, that means 2 candles ago is an ascending candle.

EX8: Close[2] > Open[2]

Detecting touching (in tick base mode) between price and ABC indicator is shown in EX9.

EX9: Ask>=ABC AND Bid<=ABC