Condition Operators
Condition Operators
Operators define how two values are compared in a strategy condition. Each condition consists of a left side (indicator), an operator, and a right side (value or another indicator).
Available Operators
| Operator | Symbol | Description | Example | |----------|--------|-------------|---------| | Greater than | > | Left is above right | RSI > 70 | | Less than | < | Left is below right | RSI < 30 | | Greater or equal | >= | Left is at or above right | ADX >= 25 | | Less or equal | <= | Left is at or below right | Volume <= 1000 | | Equal | = | Left equals right (rarely used) | — | | Cross Over | cross_over | Left crosses above right | MACD cross_over Signal | | Cross Under | cross_under | Left crosses below right | Price cross_under SMA(200) |
Comparison Operators (>, <, >=, <=, =)
These operators compare values on the current candle:
RSI > 70— true when RSI is above 70 right nowSMA(50) > SMA(200)— true when the 50-period SMA is above the 200-period SMA
They check a static relationship at each candle.
Crossover Operators (cross_over, cross_under)
These operators detect a change in relationship between two values:
Cross Over
The left value was below the right value on the previous candle and is now above it.
Example: MACD cross_over Signal
- Previous candle: MACD < Signal Line
- Current candle: MACD > Signal Line
- This is a bullish signal
Cross Under
The left value was above the right value on the previous candle and is now below it.
Example: Price cross_under SMA(200)
- Previous candle: Close > SMA(200)
- Current candle: Close < SMA(200)
- This is a bearish signal
Choosing the Right Operator
For Threshold-Based Entries
Use > or < when you want to enter while an indicator is in a certain zone:
- RSI < 30 (oversold zone)
- ADX > 25 (strong trend)
- Volume > 100000 (high volume)
For Signal-Based Entries
Use cross_over or cross_under when you want to catch the exact moment of a signal:
- MACD cross_over Signal (bullish crossover)
- Stochastic %K cross_under %D (bearish crossover)
- Price cross_over EMA(200) (price breaking above trend)
Tip: Crossover operators generate fewer signals than comparison operators because they only trigger on the exact candle where the cross happens. Comparison operators trigger on every candle where the condition is true.
Common Patterns
| Strategy Type | Condition | Operator | |--------------|-----------|----------| | RSI Oversold | RSI(14) < 30 | Less than | | Golden Cross | SMA(50) cross_over SMA(200) | Cross Over | | Trend Filter | ADX(14) > 25 | Greater than | | MACD Signal | MACD cross_over Signal | Cross Over | | Bollinger Bounce | Price < BB Lower | Less than | | Volume Spike | Volume > SMA(20) of Volume | Greater than |
FAQ
Q: What's the difference between > and cross_over?
A: > is true on EVERY candle where the condition holds. cross_over is true ONLY on the candle where the crossing happens. Use > for filters, cross_over for entry signals.
Q: Can I compare two indicators? A: Yes, both sides can be indicators. E.g., SMA(50) > SMA(200), MACD cross_over Signal Line, RSI > Stochastic %K.

