Blog / Strategy
Strategy

Zero Lag Trend Reclaim

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?

Zero Lag Trend Reclaim is a trend-following pullback strategy built around the Zero-Lag Exponential Moving Average (ZLEMA), a de-lagged baseline popularised by John Ehlers and Patrick Mulloy. A standard exponential moving average (EMA) — a smoothed average of price that reacts faster to recent bars — always trails price by a fixed amount because it is looking backward. ZLEMA reduces most of that delay by adding an error-correction term: instead of smoothing raw closing prices, it smooths a "de-lagged" input equal to 2 × Close − Close[lag], where the lag is roughly half the chosen period. The result is a responsive trend line that hugs price closely without the choppiness of price itself.

The core idea this strategy studies is simple and widely observed: in a genuine trend, price does not move in a straight line. It repeatedly dips just below the ZLEMA and then reclaims it. Rather than chasing a fresh breakout far from the line, Zero Lag Trend Reclaim waits for that shallow pullback and buys (or sells) the moment price closes back on the correct side of the baseline. Because the entry sits right next to the ZLEMA, the protective stop — placed just beyond the pullback extreme — can be kept naturally tight.

This strategy is best suited to traders who want to learn how a de-lagged moving average, a slope-based regime filter, and structural stop placement fit together in a disciplined, rules-based system. It is a study in trend-with-pullback entries, not a shortcut. It works on a single timeframe and computes both ZLEMA and Average True Range (ATR) by hand from raw open-high-low-close data, making it a clean example for anyone learning how these mechanics operate under the hood.

How It Works

The strategy only evaluates structure once per newly closed bar, while risk management runs on every tick. Here is what it does step by step.

Regime filter (no counter-trend trades):

Long entry — buying the reclaim in an uptrend. The strategy signals a long only when all of the following are true:

Short entry — selling the reclaim in a downtrend. This is the mirror image: a confirmed down-regime, the prior bar sitting at or above the line, the pullback poking above it, and the just-closed bar closing back below the ZLEMA with a bearish body, again within one ATR of the line.

Stop-loss logic:

Take-profit logic:

Breakeven lock:

zero lag EMA MT5 strategy
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
ZlemaPeriod 34 12 80 Period of the Zero-Lag EMA that forms the trend baseline.
SlopeLookback 4 2 15 Number of bars over which the ZLEMA's slope (trend strength) is measured.
SlopeThreshold 0.30 0.05 1.50 Minimum ATR-normalised ZLEMA slope required to confirm a tradable trend.
AtrPeriod 14 5 40 ATR period used for volatility scaling of the slope gate, stop buffer and risk cap.
PullbackBars 3 1 8 How many recent bars form the pullback window whose extreme anchors the stop.
StopBufferAtr 0.25 0.00 1.00 Extra stop buffer beyond the pullback extreme, in ATR units.
MaxRiskAtr 2.50 1.00 5.00 Rejects setups whose structural stop distance exceeds this many ATR.
RewardRatio 2.20 0.80 4.00 Take-profit distance as a multiple of the structural stop distance.
BreakevenR 0.80 0.20 2.00 Moves the stop to breakeven once price runs this multiple of risk in favour.
Lots 0.10 0.01 1.00 Fixed position size in lots.
Magic 4711 0 9,999,999 Magic number tag identifying this strategy's positions.
zero lag EMA MT5 strategy — MQL5 source code

Recommended Chart Settings

Zero Lag Trend Reclaim was designed to run on a single, self-contained timeframe — every calculation uses the chart's own timeframe at test time, so the same logic adapts to whatever chart you attach it to. It tends to express itself most clearly on a trending FX major or a metal such as EURUSD or XAUUSD on the H1 (1-hour) timeframe, where pullback-and-reclaim behaviour around a moving-average baseline is common.

That said, the strategy is timeframe-agnostic by construction. You can study it on higher timeframes for fewer, larger swings or on lower ones for more frequent signals. Keep in mind that behaviour will vary substantially across different symbols, sessions and market conditions, and that no single set of chart settings performs the same way in every environment. Always evaluate the strategy on the specific instrument and timeframe you intend to study before drawing conclusions.

How to Install on MetaTrader 5

What to Consider Before Using This EA

Strengths of the approach. By entering on a reclaim of the ZLEMA rather than a distant breakout, the strategy keeps its entry close to the baseline and its stop structurally tight. The ATR-normalised slope filter is a genuine attempt to avoid trading against the prevailing direction, and the breakeven lock is a sensible mechanism for protecting open profit. Computing ZLEMA and ATR directly from OHLC also makes the logic transparent and easy to audit as a learning exercise.

Known limitations. Like all moving-average systems, ZLEMA reduces lag but cannot eliminate it — sharp reversals can leave the baseline pointing the wrong way for several bars. A strict regime filter that avoids counter-trend trades will, by design, skip many bars and can sit idle during choppy, directionless markets. Requiring a pullback and a same-direction close and a non-overextended entry means qualifying setups are relatively rare, so signal frequency may be low.

Where it may underperform. Range-bound or whipsaw conditions are the natural enemy of any trend-follower. In sideways markets the ZLEMA slope may repeatedly cross the threshold and back, producing false regimes and stopped-out trades. Sudden gaps or high-impact news can also blow through structural stops. Because the strategy takes only one position at a time, it will miss additional opportunities while a trade is open. Treat it as a framework to study and stress-test, not a finished solution.

Risk Management Tips

Sound risk management matters far more than any single entry rule. Whatever you are studying, keep these general principles in mind:

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

← Back to Blog