Skip to Content

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 TRUE

If even one bar breaks the sequence (e.g., SMA dips from 105 to 104), the entire condition returns false.


Rule Configuration

ParameterDescription
IndicatorAny available indicator (SMA, EMA, RSI, MACD, etc.)
DirectionRising or Falling
Lookback BarsNumber of consecutive bars the trend must sustain (e.g., 3, 5, 10)

Examples

RuleWhat It Confirms
SMA(20) Rising for 3 barsShort-term uptrend is established and accelerating
RSI(14) Rising for 5 barsMomentum is building consistently — not just a one-candle spike
ADX(14) Rising for 3 barsTrend strength is increasing (good for breakout confirmation)
EMA(50) Falling for 4 barsMedium-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:

  1. Crossover → Momentum shifted
  2. Trend Rising → Direction is sustained, not a blip
  3. ADX filter → The market is actually trending

Configuration Steps

  1. Select “Trend” as the rule type
  2. Choose an Indicator — e.g., SMA(20)
  3. Select direction — “Rising” or “Falling”
  4. Set Lookback bars — How many consecutive bars to check (e.g., 3)
  5. Optionally override the timeframe

Next Steps

Learn how to add an extra layer of signal confirmation with the Signal Lookback filter:

→ Next: Signal Lookback

Last updated on