
Comparison operators return 1 (true) or 0 (false) and are essential for logic-based signals.
Operator | Description | Example |
|---|---|---|
| Relational comparisons |
|
| Equality comparisons |
|
Threshold-based alerts
Binary signal creation
Event detection
Regime classification
These outputs are not just conditions. They are signals that can be chained, weighted, smoothed, or combined into higher-order logic.
< > >= <=Used to detect thresholds, dominance, and relative positioning.
X:BTCUSD.rsi > 70X:BTCUSD.close < ema(X:BTCUSD.close, 50)logdiff(X:BTCUSD.close) >= 0== !=Used to detect events, extremes, or state matches.
X:BTCUSD.close == highest(X:BTCUSD.close, 20)X:BTCUSD.low == lowest(X:BTCUSD.low, 10)diff(X:BTCUSD.close) != 0Used for crossovers, dominance, and regime shifts.
ema(X:BTCUSD.close, 10) > ema(X:BTCUSD.close, 30)zscore(logdiff(X:BTCUSD.close)) < -1abs(logdiff(X:BTCUSD.close)) > abs(logdiff(ema(X:BTCUSD.close, 20)))Threshold-based alerts Signals that fire only when behavior crosses a defined boundary.
Binary signal creation Clean 0/1 outputs ready for weighting, voting, or aggregation.
Event detection Exact moments like breakouts, extremes, or state transitions.
Regime classification Market states expressed as logic, not interpretation.
Because these return numeric series, they can be:
smoothed (ema(condition, n))
weighted (0.3 * (condition))
stacked into composite logic engines