Trend Detection (Rising/Falling)
Trend Detection validates whether a selected indicator has been consecutively rising or falling over a specified number of bars. Instead of looking at where an indicator is right now, it examines the indicator’s slope direction — confirming the trend’s momentum is genuine and sustained.
How Trend Detection Works
The engine checks if the indicator’s value has been moving in the same direction for a specified number of consecutive candles:
Rising Check (Lookback = 3):
Bar -3: SMA = 100
Bar -2: SMA = 102 ✅ Higher than previous
Bar -1: SMA = 105 ✅ Higher than previous
Bar 0: SMA = 108 ✅ Higher than previous
Result: SMA has been RISING for 3 consecutive bars → Condition TRUEIf even one bar breaks the sequence (e.g., SMA dips from 105 to 104), the entire condition returns false.
Rule Configuration
| Parameter | Description |
|---|---|
| Indicator | Any available indicator (SMA, EMA, RSI, MACD, etc.) |
| Direction | Rising or Falling |
| Lookback Bars | Number of consecutive bars the trend must sustain (e.g., 3, 5, 10) |
Examples
| Rule | What It Confirms |
|---|---|
SMA(20) Rising for 3 bars | Short-term uptrend is established and accelerating |
RSI(14) Rising for 5 bars | Momentum is building consistently — not just a one-candle spike |
ADX(14) Rising for 3 bars | Trend strength is increasing (good for breakout confirmation) |
EMA(50) Falling for 4 bars | Medium-term downtrend is sustained — safe to go short |
The Trading Edge
Why This Matters
Don’t just look at where an indicator is right now — look at its momentum direction.
A common retail trap is entering when RSI crosses above 60, only to see it immediately reverse. By demanding that the indicator has been consecutively rising for 3+ bars, you filter out one-candle spikes and fake-outs. You’re forcing the trend to prove itself mathematically before you commit capital.
This single filter can dramatically improve your win rate for intraday scalping strategies.
Visual: Why Lookback Matters
Without Trend Detection: With Rising(3) Filter:
Price ─╲╱─╲╱─╱──╱── Price ─╲╱─╲╱─╱──╱──
▲ ▲ ▲ ▲ ▲
│ │ │ │ │
Enters on every Only enters HERE
uptick (many (after 3 confirmed
false signals) consecutive rises)Combining with Other Rules
Trend Detection works exceptionally well as a filter alongside crossovers:
Require ALL of:
├── EMA(9) crosses above EMA(21) (Momentum crossover — the trigger)
├── SMA(20) Rising for 3 bars (Trend is genuinely upward)
└── ADX(14) >= 25 (Market is trending, not flat)This triple-confirmed setup ensures:
- Crossover → Momentum shifted
- Trend Rising → Direction is sustained, not a blip
- ADX filter → The market is actually trending
Configuration Steps
- Select “Trend” as the rule type
- Choose an Indicator — e.g., SMA(20)
- Select direction — “Rising” or “Falling”
- Set Lookback bars — How many consecutive bars to check (e.g., 3)
- Optionally override the timeframe
Next Steps
Learn how to add an extra layer of signal confirmation with the Signal Lookback filter:
→ Next: Signal Lookback