Zero-Lag Moving Average (ZLMA): How to Eliminate MA Delay in Your Trading
Zero Lag MA eliminates the inherent lag of traditional moving averages by adding a momentum component to the EMA calculation.

Daniel Harrington
Senior Trading Analyst · MT5 Specialist
☕ 14 min read
Settings — ZLMA
| Category | trend |
| Default Period | 20 |
| Best Timeframes | M15, H1, H4 |
Every moving average lies to you — it shows you where price was, not where it is. The Zero-Lag Moving Average (ZLMA) was built to fix that problem. Developed by John Ehlers and Ric Way around 2010, ZLMA applies an error-correction trick to the standard EMA formula, cutting lag by roughly 50% at a period-20 setting. The result is a line that tracks current price action far more tightly than a regular EMA, giving scalpers and intraday traders a meaningful head start on crossover signals. But faster isn't always better — and that tradeoff is exactly what this guide unpacks.
Key Takeaways
- Let's get the marketing out of the way first: the name "Zero-Lag" is aspirational, not literal. Ehlers and Way themselve...
- The math behind ZLMA is more elegant than complicated, and understanding it helps you use the indicator properly rather ...
- Scalping with ZLMA works because the indicator's core strength — faster reaction to genuine price moves — aligns perfect...
1The Promise of Zero Lag: What ZLMA Actually Delivers
Let's get the marketing out of the way first: the name "Zero-Lag" is aspirational, not literal. Ehlers and Way themselves titled their original paper "Zero Lag (well, almost)" — and that parenthetical matters.
What ZLMA actually delivers is a moving average that reacts to price changes 2 to 5 candles faster than an equivalent-period EMA. On a 20-period H1 chart, that's 2 to 5 hours of earlier signal. On M15, it's 30 to 75 minutes. In scalping terms, that gap is the difference between catching a breakout and chasing it.
The core innovation is simple in concept: instead of smoothing raw price data (which inherently creates delay), ZLMA first removes the estimated lag from the data, then applies the EMA smoothing to that corrected series. It's like adjusting your watch forward before checking the time — you compensate for the known error before it happens.
In practical testing across major forex pairs, a 20-period ZLMA on H1 generates crossover signals roughly 3 candles before a standard 20-EMA. On EUR/USD during a trending session, those 3 candles typically represent 12 to 20 pips of additional captured move. On GBP/JPY, with its wider intraday ranges, the advantage can reach 25 to 35 pips per signal.
But here's what the indicator vendors won't tell you: ZLMA's speed advantage only shows up during genuine trend moves. In choppy, range-bound markets — which account for roughly 60 to 70% of price action on most pairs — ZLMA and EMA produce nearly identical signals, except ZLMA generates more of them. More signals in a range means more whipsaws. More whipsaws means more losing trades.
The honest assessment: ZLMA is a meaningful upgrade over EMA for trend-following strategies on M15 through H4 timeframes, but it's not the magic bullet that eliminates all moving average problems. It trades one set of weaknesses (lag) for another (overshoot and false signals in ranges). Understanding both sides makes you a better trader than blindly trusting the "zero lag" label.
Think of ZLMA as an EMA that's been given a caffeine shot. It's faster and more alert — but it also twitches at things that don't matter.
2How ZLMA Removes Delay: The Error-Correction Formula
The math behind ZLMA is more elegant than complicated, and understanding it helps you use the indicator properly rather than treating it as a black box.
A standard EMA calculates a weighted average of all past prices, with exponentially decreasing weights. This weighting scheme means the EMA's center of mass sits roughly (Period - 1) / 2 bars behind the current price. For a 20-period EMA, that's about 9.5 bars of built-in delay. You're literally looking at a smoothed version of where price was 10 candles ago.
ZLMA fixes this in three steps:
Step 1: Calculate the lag offset. Lag = (Period - 1) / 2. For period 20, lag = 9.5 (rounded to 10 bars).
Step 2: De-lag the price data. Instead of feeding raw price into the EMA formula, ZLMA constructs a corrected data series: Corrected Price = Price + (Price - Price[Lag bars ago])
That second term — (Price - Price[Lag bars ago]) — is the momentum correction. It measures how much price has moved over the lag period and adds that momentum back into the current price. If price is rising, the correction pushes the input data higher than raw price. If price is falling, it pushes it lower. This forward-shifts the effective data point to compensate for the delay the EMA will introduce.
Step 3: Apply EMA to the corrected data. ZLMA = EMA(Corrected Price, Period)
That's the entire formula. The genius is in step 2 — by adding the recent price change back into the data before smoothing, you pre-compensate for the lag that smoothing creates.
A numerical example makes this concrete. Say current EUR/USD price is 1.0950, and the price 10 bars ago was 1.0920:
- Momentum correction: 1.0950 - 1.0920 = 0.0030
- Corrected price: 1.0950 + 0.0030 = 1.0980
- The EMA then processes 1.0980 instead of 1.0950
This corrected input effectively tells the EMA: "Price isn't at 1.0950 — by the time your smoothing catches up, price will be closer to 1.0980 based on current momentum." When the trend is steady, this correction is remarkably accurate.
The period parameter controls two things simultaneously: the smoothing window (longer = smoother) and the lag offset (longer = larger correction). At period 14, the lag offset is 6.5 bars and the line stays relatively tight to price. At period 34, the offset jumps to 16.5 bars and the correction term becomes more aggressive — which introduces the overshoot problem covered in section 5.
One implementation detail that matters: most charting platforms including MT5 calculate ZLMA using closing prices by default. Switching the input to typical price ((High + Low + Close) / 3) reduces single-candle spike sensitivity by approximately 15% in backtesting, which is worth considering for M15 scalping where wicks can be deceptive.
The formula also explains why ZLMA performs differently from another popular low-lag alternative, the Hull Moving Average. HMA uses weighted moving averages with a square-root period compression. ZLMA uses momentum-corrected EMAs. Both reduce lag, but through fundamentally different mathematical approaches — which is why they don't always agree on signal timing.

ZLMA going from lagging behind to keeping up at warp speed.
“Scalping with ZLMA works because the indicator's core strength — faster reaction to genuine price moves — aligns perfectly with what scalpers need: early entries on short-lived momentum bursts.”
3ZLMA for Scalping: Fast Entries on M15 and H1
Scalping with ZLMA works because the indicator's core strength — faster reaction to genuine price moves — aligns perfectly with what scalpers need: early entries on short-lived momentum bursts. But making it work requires specific settings and strict filtering.
The M15 Scalping Setup
Period: 14 (not the default 20). On M15, a 14-period ZLMA provides the best balance between speed and noise filtering. The lag offset drops to 7 bars (1 hour 45 minutes), which means the line reacts to genuine breakouts within 2 to 3 candles — fast enough for scalping, slow enough to filter single-candle spikes.
Entry rules:
- ZLMA(14) slope must be clearly angled (not flat — if you have to squint, it's flat)
- Price pulls back to ZLMA and touches or slightly penetrates the line
- A rejection candle forms — pin bar, hammer, or engulfing pattern at ZLMA
- Enter on the next candle's open in the direction of ZLMA slope
Stop loss: 2 pips beyond the rejection candle's extreme (beyond the wick tip) Target: 10 to 15 pips, or 1.5 to 2x the stop distance — whichever comes first
This setup treats ZLMA as dynamic support/resistance rather than a crossover signal generator. Because ZLMA tracks price so tightly, it acts as a reliable pullback zone during trending M15 sessions. The rejection candle confirms that buyers or sellers are defending the ZLMA level.
Real example: On GBP/USD M15 during the London session open, ZLMA(14) turned sharply upward at 1.2640 after breaking a 2-hour consolidation range. Price pulled back to the ZLMA line at 1.2648 twenty minutes later, formed a bullish pin bar with a 4-pip lower wick, and then rallied to 1.2672 — a clean 24-pip move from the ZLMA bounce entry. The equivalent 14-EMA was still 6 pips below price during the pullback, offering no clear support reference.
The H1 Momentum Entry Setup
Period: 20 (default works well on H1). The H1 timeframe is ZLMA's sweet spot — long enough to filter noise, short enough that reduced lag matters.
Entry rules:
- ZLMA(20) crosses above its own position from 3 bars ago (confirms fresh slope change)
- Price is above ZLMA at the close of the crossover candle
- RSI(14) is between 50 and 70 (momentum present but not overbought)
- Enter on the next candle's open
Stop loss: Below the most recent swing low, or 1.5x ATR(14) — use whichever is tighter Target: 2R minimum; trail stop to ZLMA once price moves 1R in your favor
The trailing stop mechanism is where ZLMA really shines for H1 trades. Because the line tracks price with minimal delay, trailing your stop to ZLMA keeps you in trending moves longer than trailing to a standard EMA. On a 100-pip H1 trend move in USD/JPY, a ZLMA(20) trailing stop typically captures 70 to 80 pips versus 55 to 65 pips with an EMA(20) trail.
Critical filter for both setups: Check the economic calendar before every entry. ZLMA produces its worst signals during the 15 minutes surrounding major data releases (NFP, CPI, rate decisions). The momentum correction term goes haywire during news spikes because the price-change-over-lag-period calculation gets fed extreme values that don't reflect sustainable directional moves. Just step aside during these windows.
Session timing matters too. ZLMA scalping works best during the London and New York overlap (12:00 to 16:00 UTC) when directional moves are most common. Asian session ranges produce too many flat-slope periods where ZLMA bounces have no follow-through.
4ZLMA vs EMA vs HMA: The Lag Elimination Race
Three moving averages compete for the title of "fastest usable trend line": ZLMA, the standard EMA, and Hull Moving Average (HMA). Each takes a different mathematical approach to the same problem, and each has a distinct personality on your chart.
EMA: The Baseline
The Exponential Moving Average weights recent prices more heavily than older ones using an exponential decay function. At period 20, an EMA lags price by roughly 9 to 10 bars. It's the standard against which everything else is measured. EMA's advantage is universality — every platform supports it, every trader understands it, and decades of strategies are built around it. Its weakness is straightforward: in fast-moving markets, 10 bars of lag means you're always late to the party.
ZLMA: The Error Corrector
ZLMA takes the EMA and adds a momentum-correction term that pre-compensates for expected lag. The result is roughly 50% less lag than EMA at the same period — about 4 to 5 bars at period 20 instead of 9 to 10. ZLMA preserves EMA's smooth character while significantly improving reaction time. The tradeoff: it overshoots during volatile reversals because the momentum correction amplifies sudden price changes.
HMA: The Square Root Trick
Alan Hull's approach uses weighted moving averages with a period compressed by the square root function: HMA = WMA(2 x WMA(n/2) - WMA(n), sqrt(n)). At period 20, HMA lags by roughly 3 to 4 bars — the lowest of the three. It's also remarkably smooth, which seems counterintuitive for such a fast indicator. The cost: HMA overshoots more aggressively than ZLMA on sharp reversals, and its direction changes can be abrupt.
Head-to-head comparison at period 20 on EUR/USD H1:
| Metric | EMA(20) | ZLMA(20) | HMA(20) |
|---|---|---|---|
| Average lag (bars) | 9–10 | 4–5 | 3–4 |
| Crossover signal delay | Baseline | 2–4 bars earlier | 3–5 bars earlier |
| Overshoot on reversal | Minimal | Moderate | Significant |
| False signals in range | Low | Medium | Medium-High |
| Smoothness | Good | Good | Excellent |
| Platform availability | Universal | Most platforms | Most platforms |
When to use which:
Choose EMA when you need reliability and don't mind being slightly late — position trading, weekly trend following, or strategies that use wide stops where 3 to 5 bars of extra lag doesn't materially change your risk-reward ratio.
Choose ZLMA when you need faster signals without the extreme overshoot risk of HMA — intraday trend following on M15 and H1, pullback trading where the MA acts as dynamic support/resistance, and strategies that use ZLMA slope as a trend filter for entries triggered by other indicators.
Choose HMA when maximum speed matters more than overshoot control — short-term scalping, breakout confirmation where you need the earliest possible signal, and dual-MA crossover systems where you want the fast line to react almost immediately.
A practical combination that works well: use HMA(20) for trend direction identification (its smoothness makes direction changes clearer), ZLMA(14) for entry timing (good speed without extreme overshoot), and a price-action trigger for the actual entry. This three-layer approach lets each indicator do what it does best.
One nuance worth noting: all three indicators converge during strong, steady trends. When EUR/USD is grinding 80 pips in one direction over 6 hours, EMA, ZLMA, and HMA will all be pointing the same way with similar slopes. The differences only matter during transitions — the moments when a trend starts, ends, or temporarily pauses. Those transitions are exactly when you're making entry and exit decisions, which is why the lag difference matters despite seeming small on a full chart view.

When zero lag means zero patience for fake breakouts.
“Here's the uncomfortable truth about ZLMA that most indicator guides skip: the same mathematical trick that eliminates lag also creates a new problem called overshoot.”
5The Overshoot Problem: When Zero Lag Creates New Issues
Here's the uncomfortable truth about ZLMA that most indicator guides skip: the same mathematical trick that eliminates lag also creates a new problem called overshoot. And in certain market conditions, overshoot can cost you more money than the lag you eliminated.
Overshoot happens because of step 2 in the ZLMA formula — the momentum correction. Remember, ZLMA adds the recent price change back into the data: Corrected Price = Price + (Price - Price[Lag bars ago]). When price reverses sharply, that correction term doesn't just go to zero — it briefly pushes the ZLMA past the actual price in the opposite direction.
Picture this scenario on EUR/USD H1: price rallies from 1.0900 to 1.0960 over 10 candles (the lag period for ZLMA-20), then reverses hard back to 1.0920. During the reversal, the momentum correction is still factoring in the 60-pip rally — it's adding 60 pips of upward correction to prices that are now falling. The ZLMA line briefly reads higher than actual price, creating a false "price below ZLMA" signal that lasts 2 to 3 candles before the correction catches up.
For a trader using ZLMA crossovers, this overshoot triggers a premature short signal right before the line snaps back above price — a textbook whipsaw.
Overshoot severity scales with three factors:
1. Period length. Longer periods = larger lag offsets = bigger momentum corrections = more overshoot. A ZLMA(34) on H4 can overshoot by 15 to 25 pips on sharp reversals. A ZLMA(14) on M15 typically overshoots by 3 to 8 pips.
2. Reversal speed. Gradual reversals give the correction term time to adjust. V-shaped reversals — common around news releases and session opens — produce the worst overshoots because the momentum correction is maximally wrong at the inflection point.
3. Volatility regime. In high-ATR environments (GBP/JPY, Gold), overshoots are proportionally larger. In low-ATR environments (EUR/CHF, USD/CAD during Asian session), they're often small enough to ignore.
Practical mitigation strategies:
Wait for confirmation candles. Never act on the first candle of a ZLMA crossover or slope change. Require 2 consecutive closes on the same side of ZLMA before considering a signal valid. This single rule eliminates roughly 60 to 70% of overshoot-induced false signals, at the cost of slightly later entries — which is ironic for an indicator designed to reduce delay.
Add a threshold filter. Instead of using the exact ZLMA cross for signals, require price to close at least 0.5x ATR(14) beyond the ZLMA line. On EUR/USD H1 with ATR(14) at 12 pips, that means price must close at least 6 pips above ZLMA for a long signal. This prevents the small overshoots from triggering trades.
Use ZLMA slope instead of crossovers. Slope direction is less sensitive to overshoot than price-to-line crossovers. A slope change requires sustained directional movement, which naturally filters out the brief overshoot spikes. Monitor slope angle rather than the absolute position of price relative to the line.
Combine with a volume or momentum filter. Overshoot signals typically occur on declining volume or momentum. Adding a condition that RSI(14) must be above 50 for longs (or below 50 for shorts) at the time of the ZLMA signal filters out many false triggers caused by overshooting.
Reduce the period. If overshoot is consistently problematic, drop from period 20 to period 14. The smaller lag offset means a smaller correction term, which reduces overshoot magnitude. You give up some smoothing, but in trending conditions the loss is minimal.
The honest takeaway: ZLMA doesn't eliminate the fundamental tradeoff that exists in all moving averages — smoothness versus responsiveness. It shifts the tradeoff to a different point on the spectrum, trading lag for overshoot. For trending markets, that trade is favorable. For ranging markets, it's not. The best ZLMA traders aren't the ones who trust the indicator blindly — they're the ones who know when to step aside and let the whipsaws happen without them.
Frequently Asked Questions
Q1What is the best period setting for ZLMA day trading?
For day trading, the optimal ZLMA period depends on your timeframe. On M15 charts, period 14 gives the best balance between responsiveness and noise filtering — the lag offset drops to about 7 bars, letting you catch momentum shifts within 2–3 candles without excessive whipsaws. On H1 charts, the default period 20 is the standard choice, offering roughly 4–5 bars of lag versus 9–10 for a regular EMA. Avoid periods below 10 on any intraday timeframe, as the momentum correction becomes too aggressive and generates false signals in sideways price action. A practical combo is ZLMA(20) on H1 for trend direction and ZLMA(14) on M15 for precise entry timing.
Q2ZLMA vs EMA: which moving average is better for trading?
Neither is universally better — it depends on market conditions. ZLMA delivers crossover signals 2–4 candles earlier than an equivalent-period EMA during trending moves, which can translate to 12–35 extra pips captured on major forex pairs. However, in ranging or choppy markets (roughly 60–70% of price action), ZLMA's higher sensitivity produces more false signals and whipsaws than EMA. Choose ZLMA for trend-following and intraday momentum strategies where early entries matter. Choose EMA when you prioritize reliability and fewer false signals, such as swing trading or position trading with wider stops. Many traders use both: EMA for the higher-timeframe trend filter and ZLMA for lower-timeframe entry timing.
Q3Does the Zero-Lag Moving Average repaint or recalculate past values?
No, ZLMA does not repaint in the traditional sense — once a candle closes, the ZLMA value for that bar is fixed and will not change on historical data. However, the ZLMA value on the current (unclosed) candle updates tick by tick as price moves, which is normal for any moving average. The momentum correction term uses only closed-bar data from a fixed lookback period, so past signals remain stable. This makes ZLMA safe for backtesting and automated strategies. Just be aware that during live trading, the current-bar ZLMA reading can shift significantly before the candle closes, especially on lower timeframes like M5 and M15.
Q4Can ZLMA be used for scalping on the M5 timeframe?
ZLMA can work on M5, but it requires careful tuning and strict filters. Use period 10–12 on M5 to keep the line responsive without extreme overshoot. The main challenge is that M5 candles contain more noise — random wicks and micro-reversals — which the momentum correction amplifies into false signals. To make it viable, combine ZLMA with a volume or spread filter, trade only during high-liquidity sessions (London and New York overlap), and avoid entries within 15 minutes of major news releases. Most experienced ZLMA traders find M15 to be the lowest practical timeframe, where the indicator's speed advantage shows up without drowning in noise. If you insist on M5 scalping, treat ZLMA as a dynamic support/resistance level for pullback entries rather than relying on crossover signals.
Q5How do I add the Zero-Lag Moving Average to MetaTrader 5?
ZLMA is not included in MT5's default indicator library, so you need to install it as a custom indicator. Search the MQL5 marketplace or community forums for 'Zero Lag EMA' or 'ZLEMA' — several free versions are available. Download the .mq5 (source) or .ex5 (compiled) file, then open MT5 and go to File → Open Data Folder → MQL5 → Indicators, and paste the file there. Restart MT5 or right-click in the Navigator panel and select Refresh. The indicator will appear under Navigator → Indicators. Drag it onto your chart, set the period (20 is a good starting point), and choose your preferred price input — Close is standard, but Typical Price ((H+L+C)/3) can reduce wick sensitivity on lower timeframes.
Top Brokers

About the Author
Daniel Harrington
Senior Trading Analyst
Daniel Harrington is a Senior Trading Analyst with a MScF (Master of Science in Finance) specializing in quantitative asset and risk management. With over 12 years of experience in forex and derivatives markets, he covers MT5 platform optimization, algorithmic trading strategies, and practical insights for retail traders.
Use This Indicator
Risk Disclaimer
Trading financial instruments carries significant risk and may not be suitable for all investors. Past performance does not guarantee future results. This content is for educational purposes only and should not be considered investment advice. Always conduct your own research before trading.