Disclaimer: This article is for educational and informational purposes only. It does not constitute financial or investment advice. Trading forex and CFDs carries significant risk of loss. Past performance of any strategy — including backtests — does not guarantee future results. Never trade with money you cannot afford to lose.
What Is This Strategy?
The Decycler Trend Pullback strategy is a single-timeframe, trend-following pullback system built around John Ehlers' Simple Decycler — a signal-processing filter that separates price into two clean, orthogonal parts. In technical terms, the strategy runs a one-pole high-pass filter (a filter that keeps fast wiggles and removes the slow drift) on the closing price. Subtracting that high-pass output from price leaves a smooth, near-zero-lag trend line called the "decycler," while the high-pass output itself becomes a detrended oscillator that swings around zero. In other words, one filter hands you both the trend and the cycle at the same time.
This is what makes the approach interesting as a study. Most moving-average systems have to compromise: a slower average defines the trend cleanly but lags badly, while a faster one reacts to pullbacks but whipsaws. Because the decycler is designed to minimize lag, this strategy can define the trend direction and the pullback timing from the same construct without those two goals fighting each other. The strategy is built with FX majors and gold (XAUUSD) on the M15–H1 timeframes in mind, though the timeframe is never hardcoded — it simply uses whatever chart you attach it to.
As a learning tool, the Decycler Trend Pullback is well suited to traders who already understand basic trend-following and want to explore how digital signal processing (DSP) concepts — high-pass filters, zero-lag construction, cycle isolation — translate into concrete trade rules. It is a strategy analysis exercise, not a shortcut. Treat it as a way to study how a low-lag filter behaves in trending versus choppy markets.
How It Works
The strategy processes only closed bars to avoid repainting (signals changing after the fact). The currently forming bar is used solely to detect when a new bar has opened. On each new closed bar, it recomputes the decycler filter over a long retained history so the recursive filter is fully settled, then evaluates a set of conditions.
The trend filter (direction):
- The strategy measures the slope of the decycler line over the last
SlopeLookbackbars. - That slope is normalized by the current ATR (Average True Range, a volatility measure), giving a slope expressed in "ATR units per bar."
- The trend is considered up when the normalized slope is at or above
TrendThreshold, and down when it is at or below the negative of that threshold. This ensures the strategy only acts when the trend has genuine, volatility-adjusted strength — not a flat, drifting line.
The cycle filter (pullback timing):
- The high-pass output (the cycle) oscillates around zero. A dip below zero means price has sagged under the trend line — a pullback.
- The strategy requires a real pullback: the deepest cycle value over the lookback window must reach at least
MinDipAtr × ATRin depth. Shallow noise does not qualify. - The entry trigger is a zero-cross: for longs, the cycle must cross up through zero (the pullback low has been reclaimed, meaning the trend is resuming). For shorts, it must cross down through zero (a rally high has been rejected).
Entry conditions the strategy signals:
- Long: decycler slope up (trend confirmed), the cycle has genuinely dipped by at least the required depth, and the cycle crosses up through zero.
- Short: the mirror image — decycler slope down, the cycle has genuinely rallied, and the cycle crosses down through zero.
Exit and risk logic:
- Stop-loss: placed at
SlAtrMult × ATRaway from entry, so the stop distance scales with current volatility. - Take-profit: placed at
TpAtrMult × ATRfrom entry. - Trailing stop (optional): if
TrailAtrMultis greater than zero, once price moves in your favor byTrailAtrMult × ATR, the stop ratchets forward to lock in favorable movement. It only ever moves in the profitable direction and never loosens. - Only one position at a time is held per symbol, tagged with the
Magicnumber, and the stop-loss, take-profit, and trailing logic manage the trade from there.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| DecyclerPeriod | 30 | 10 | 100 | Period of the Ehlers high-pass filter. Larger values produce a smoother, slower trend line; smaller values react faster but pass more noise. |
| SlopeLookback | 4 | 2 | 20 | Number of bars used to measure the decycler's slope (trend direction) and to scan for the pullback depth. |
| TrendThreshold | 0.05 | 0.0 | 0.5 | Minimum absolute normalized slope (in ATR per bar) required to consider the trend strong enough to trade. Higher values demand a steeper trend. |
| MinDipAtr | 0.15 | 0.0 | 1.5 | Minimum required pullback depth of the cycle, measured in ATR. Filters out shallow, noise-level dips. |
| AtrPeriod | 14 | 7 | 30 | Lookback period for the ATR used in normalization, stops, targets, and trailing distance. |
| SlAtrMult | 2.0 | 0.5 | 5.0 | Stop-loss distance as a multiple of ATR. |
| TpAtrMult | 3.0 | 0.5 | 8.0 | Take-profit distance as a multiple of ATR. |
| TrailAtrMult | 1.5 | 0.0 | 4.0 | Trailing-stop distance as a multiple of ATR. Set to 0 to disable trailing. |
| Lots | 0.10 | 0.01 | 2.0 | Fixed trade volume in lots. |

Recommended Chart Settings
This strategy was designed with FX majors (such as EUR/USD, GBP/USD, USD/JPY) and XAUUSD (gold) in mind, on the M15 to H1 timeframes. These markets tend to produce the kind of sustained directional moves punctuated by orderly pullbacks that the decycler is built to isolate. That said, the timeframe is never hardcoded — the strategy runs on whichever chart you attach it to, so you are free to study its behavior across other instruments and periods.
Keep in mind that results will vary substantially across different market conditions. A parameter set that behaves well on one symbol or during one volatility regime may behave very differently on another. Any timeframe or symbol you test should be evaluated on its own merits using a demo account first.
How to Install on MetaTrader 5
- Download the .ex5 file from the link below.
- Copy it to your MT5
MQL5\Expertsfolder. - Restart MetaTrader 5 or refresh the Navigator panel.
- Drag the EA onto a chart matching the recommended symbol and timeframe.
- Configure the input parameters and enable Algo Trading.
What to Consider Before Using This EA
Strengths of the approach. The core idea — using a low-lag filter to define both trend and pullback — is elegant and addresses a real weakness of conventional moving-average systems. Because the decycler is designed to reduce lag, the trend read is more responsive than a comparable simple or exponential average. The multi-layered entry filter (confirmed slope + genuine dip depth + zero-cross) is deliberately conservative, which historically tends to reduce the number of low-quality signals in choppy conditions. ATR-based stops, targets, and trailing mean the trade management adapts to volatility rather than using fixed distances.
Known limitations. Like all trend-following pullback systems, this strategy assumes trends actually exist and persist. In range-bound, sideways, or violently whipsawing markets, the decycler slope may flip direction frequently, and pullback entries can be stopped out repeatedly — a phenomenon common to every trend follower. The high-pass filter is recursive (each value depends on the last), so it needs a long warm-up window; the strategy handles this by retaining ample history, but it means signals only begin after enough bars have formed. The zero-cross trigger can also arrive late in a fast, shallow retracement, and a deep pullback that qualifies on depth may occasionally mark the start of a genuine trend reversal rather than a continuation.
Where it may underperform. Expect weaker behavior during low-volatility consolidations, around major news spikes that produce erratic ATR readings, and in markets that grind sideways without clean directional slope. No single parameter set is optimal everywhere, and over-optimizing on historical data ("curve fitting") tends to produce settings that look excellent in the past and disappoint going forward. Study the strategy's logic first, then test conservatively.
Risk Management Tips
Risk management is the part of trading you can actually control, and it matters more than any entry signal. A few general principles worth studying:
- Risk a small, fixed fraction per trade. Many educational sources suggest never risking more than 1–2% of your account on a single position. Because this strategy uses a fixed
Lotsvalue rather than sizing to a percentage, you should calculate whether the ATR-based stop distance keeps your per-trade risk within that band on your chosen symbol. - Always test on a demo account first. Run the EA in a risk-free simulated environment across varied market conditions before considering any live capital. This is how you learn how it behaves, not just how it looks in theory.
- Understand drawdown. Every strategy endures losing streaks. Study the depth and duration of drawdowns the approach can produce, and ask yourself honestly whether you could tolerate them without abandoning the plan at the worst moment.
- Do not risk money you cannot afford to lose. Leverage magnifies both directions. Size your account and expectations accordingly.
- Keep records and review. Treat every trade as data. Reviewing your results turns the EA from a black box into a genuine learning instrument.
Risk Warning
Trading foreign exchange, CFDs, and other leveraged financial instruments involves substantial risk of loss and is not suitable for all investors. The strategies and tools discussed on this page are provided for educational purposes only and do not constitute financial advice, investment recommendations, or solicitation to trade. Always consult a qualified financial adviser before making trading decisions. Past backtest performance is not indicative of future results.
Downloads
- Expert Advisor: DecyclerTrendPullback.ex5 (30 downloads)
- Source Code: DecyclerTrendPullback.mq5 (27 downloads)
- Documentation: DecyclerTrendPullback.pdf (53 downloads)