comparison is the workhorse condition. It compares one indicator
to either a literal number or another indicator.
Shape
{ "type": "comparison", "indicator": "rsi", "operator": "<", "value": 30 }{ "type": "comparison", "indicator": "close", "operator": ">", "value": "ema_200" }Params
indicator- column to read (price columnsopen/high/low/closeor any indicator name you declared).operator- one of>,<,>=,<=,==.value- a number or the name of another column.
Evaluation
On-close by default. Set evaluate: on_tick if you're comparing
price columns (close > level) and need intra-bar firing -
indicator-vs-indicator comparisons don't change inside a bar.
Pitfalls
==on floats is brittle. For "RSI hit 50" use a tight range with in_range instead.- Naming typos: the engine will error on a comparison that references an unknown column.
