Expressions

Expressions:

Any expression can define as an indicator. Expressions are described in Section 4. Write an expression in the Parameters field.

[FUNC] Expressionexpression 

If Expressions:

Conditional expressions can define as an indicator. Conditional expressions are described in Section 4.

If {condition} Then {expr 1} Else {expr 2}

Write expression condition and action in true mode and false mode in the Parameters field. If the condition is true, it returns the value of the expression 1 and else it returns the value of expression 2.

[IF] If {condition} then expr1 else expr2Condition, expr1, expr2 

“If Wait While” Expressions:

By default, the output of this type of IF Expression is false. If expr1 turns to true, it waits for expr2 to be true. After expre1 becomes true, as long as the condition is true, it doesn’t care to expr1 value and only waits for expr2. As expr2 turns to true, the output will be true. After expr1 turns to true, if the condition turns to false or max time or max number of candles reached since expr1 are true, it goes and checks for expr1 again.

[IF] If Wait Whileexpr1, expr2, condition, max time, max candles“Max time” is in seconds Candles are in current time frame

Trigger:

Some expressions are true only for a moment. For example, “Ask=1.12345” is true only in a moment that Ask price is 1.12345. Sometimes you need to keep value on true for a certain number of candles or amount of time.

This indicator retunes false by default. If expr becomes true, it returns true. As reset expression becomes true or either max time or max candles are reached, it returns false again.

[TRIGGER] If Then true Tillexpr, reset, max time, max candles“Max time” is in seconds Candles are in current time frame

Keeper:
Some expressions are true only for a while. For example, “RSI1 > 90.0” is true only if current value of rsi1 is greater than 90. Sometimes you need to catch a certain expression’s value only if a certain condition is true and you want to keep it in memory for a certain number of candles or amount of time or till a reset expression got trigger. For example, you want to keep MA1 value in memory as long as RSI1>90. That means if rsi1 goes below 90, keeper value won’t change. If reset expression gets true, keeper value will be zero again.
This indicator retunes 0 by default. If “expr” becomes true, it calculates “VAL expression” and returns its result. As reset expression becomes true or either max time or max candles are reached, it returns 0 again.
If we don’t mention Reset Expression, it will be in memory till next time which expr get true again.

[KEEPER] If Then Keepexpr, val, reset, max time, max candles“Max time” is in seconds Candles are in current time frame