Overview

OR Logic & Grouping

Until now you’ve used AND chains.
Parentheses and OR let you branch conditions without writing multiple rules.

Basic OR Example

TICK (rsi WITH minutes=1 < 30 OR price < sma WITH minutes=5)
THEN
order SET action=buy, quantity=1, transmit=true

Mixed AND / OR

TICK (ema WITH minutes=1 > ema WITH minutes=5 OR macd WITH minutes=5 > 0)
AND volume WITH minutes=1 > 5000
THEN
order SET action=buy, quantity=2, transmit=true

Nested Groups

TICK (
(rsi WITH minutes=1 < 30 AND price < sma WITH minutes=5)
OR (stochastic WITH minutes=5.k < 20)
)
THEN
order SET action=buy, quantity=1, transmit=true