Conditions
Conditions decide which flow the process takes after a gateway. They are set on the flows leaving the gateway: select a flow on the diagram and open the properties panel.
Builder
Section titled “Builder”The Builder assembles a condition without code:
- What to check? — a variable of a block further up the flow or a strategy parameter. For lists (candles, indicator) choose the field and which candle: the last, the previous or 3 back.
- Operator — greater, less, equal, not equal, plus crosses above and crosses below.
- Compare with — a number or another variable.
Several conditions are combined: Run if true: all (and) or any (or). Below the form you see how the condition reads in words.
If no block up the flow has a result, the builder has nothing to offer — add, for example, Compute indicator or Order status before the gateway.
Expression (FEEL)
Section titled “Expression (FEEL)”The Expression tab lets you write the condition as FEEL code. The editor suggests variable names and highlights errors.
result[-1].Value > 70klines[-1].Close > klines[-2].Close and strategyParams.direction = "long"Common pitfalls:
- lists are indexed from 1; the last element is
[-1], the one before it[-2]; - equality is a single
=; - strings use double quotes.
If an expression is more complex than the builder supports, it can only be edited as code. Clear the field to build the condition in the builder again.
Default flow
Section titled “Default flow”One flow of a Condition (gateway) can be marked as the default flow: the process takes it when no condition is true. Without one, a gateway whose conditions are all false stops the process with an incident.