Skip to content

    Zero Lag Moving Average (ZLMA): Formula, Real Nifty Example and Indian Trading Guide

    Quick answer

    Learn the Zero Lag Moving Average formula with a real Nifty EMA/ZLMA table, a dated crossover signal, rupee profit maths, Indian taxes and best settings.

    19 June 2026
    18 min read
    3,522 words

    Key Takeaways

    • 1.The Zero Lag Moving Average (ZLMA) tries to cancel the delay built into a normal EMA by adding back the recent price change, using the formula ZLMA = EMA(price) + (EMA(price) minus EMA of that EMA), which is the same as 2 times EMA minus EMA of EMA.
    • 2.Because it reacts faster, ZLMA turns earlier than a plain EMA at the start of a Nifty or Bank Nifty trend, but it also whipsaws more in sideways, range bound sessions.
    • 3.On a real Nifty 50 sample from late September 2024, a 10 period ZLMA crossed below price action and the EMA roughly one to two sessions before the plain 10 EMA, which is the entire point of the indicator.
    • 4.Common Indian settings: 10 to 13 period ZLMA for intraday on 5 and 15 minute charts, 20 to 21 period for swing trades on the daily chart, always confirmed with volume or RSI.
    • 5.Profit and loss examples here are illustrative, not advice. Index option gains are taxed as business income at your slab rate, equity STCG is 20 percent and LTCG above Rs 1.25 lakh is 12.5 percent, and STT plus brokerage must be subtracted from any gross profit.

    What the Zero Lag Moving Average Actually Does

    Every moving average is a smoothed average of past prices, so by design it sits behind the current price. A 10 day EMA on Nifty is effectively reporting where the trend was a few days ago, not where it is right now. That delay, called lag, is the cost you pay for smoothness. In a fast move it means you enter late and exit late. The Zero Lag Moving Average, designed by John Ehlers, attacks this problem directly. It does not remove lag completely, the name is marketing more than mathematics, but it removes a large part of it by estimating the recent price change and adding it back into the average.

    The intuition is simple. A normal EMA undershoots a rising market because it is dragged down by older, lower prices. ZLMA measures roughly how far the EMA is lagging behind the data and shifts the line forward by that amount. The result is a line that hugs price much more tightly. On a trending Nifty chart the ZLMA will sit almost on top of the candles, while the plain EMA trails visibly below in an uptrend and above in a downtrend. This tighter fit is what gives earlier crossover signals.

    The trade off is honesty about noise. By pulling the line closer to price, ZLMA also lets more of the short term noise through. In a clean trend that is a gift. In a choppy, range bound Bank Nifty afternoon it is a curse, because every minor wiggle can trigger a crossover. Understanding this single trade off, faster signals in exchange for more false signals, is the key to using the indicator well in Indian markets.

    The ZLMA Formula, Step by Step

    The most widely used version of the Zero Lag Moving Average is the double EMA correction. You compute it in three steps. Step one, calculate a normal EMA of the closing price for your chosen period, call it EMA1. Step two, calculate an EMA of EMA1 using the same period, call it EMA2. This second smoothing measures the lag itself. Step three, the Zero Lag Moving Average is ZLMA = EMA1 + (EMA1 minus EMA2), which simplifies to ZLMA = 2 times EMA1 minus EMA2.

    The term (EMA1 minus EMA2) is the estimate of how much EMA1 is lagging. In a rising market EMA1 is above EMA2, so the correction is positive and pushes the line up toward price. In a falling market EMA1 is below EMA2, the correction is negative, and the line is pushed down. When price moves sideways, EMA1 and EMA2 sit almost on top of each other, the correction is near zero, and ZLMA behaves almost exactly like an ordinary EMA. That is why ZLMA gives you no special edge in a flat market.

    There is an alternative Ehlers form that shifts the price input by a lag value of (period minus 1) divided by 2 before smoothing. The two methods give very similar lines, and most Indian charting platforms, including TradingView, Zerodha Kite and Upstox, label the double EMA version simply as ZLMA or Zero Lag EMA. The worked table below uses the double EMA method because it is the one you will see most often and can reproduce in a spreadsheet.

    Tip

    The EMA smoothing factor is k = 2 divided by (period plus 1). For a 10 period EMA, k = 2 divided by 11 = 0.1818. The first EMA value is usually seeded with the first close or a simple average. Because of this seeding, the first several rows of any ZLMA you compute by hand are warm up values and should not be traded.

    A Worked EMA and ZLMA Table on Real Nifty Closes

    The original version of this page used invented prices like Rs 100, 102, 104. That teaches nothing about how the indicator behaves on a real index. Below is a 10 period calculation built on Nifty 50 daily closing levels from late September into early October 2024, a stretch where the index made a record high near 26,277 on 27 September 2024 and then rolled over sharply into October. These closing levels are realistic, rounded representative values for that window and are illustrative, so verify exact official closes on NSE before using them in your own backtest.

    EMA1 is the 10 period EMA of the close. EMA2 is the 10 period EMA of EMA1. ZLMA equals 2 times EMA1 minus EMA2. Notice in the table how, once the index tops out and falls, the ZLMA drops faster than EMA1 and crosses below the closing price earlier. That earlier turn is the signal a trader is paying for.

    Date (2024)Nifty CloseEMA1 (10)EMA2 (10)ZLMA = 2xEMA1 - EMA2Close vs ZLMA
    20 Sep25,79125,50025,36025,640Above
    23 Sep25,93925,58025,40025,760Above
    24 Sep25,94025,64625,44525,847Above
    25 Sep26,00425,71125,49325,929Above
    26 Sep26,21625,80325,54926,057Above
    27 Sep26,17825,87125,60826,134Above
    30 Sep25,81125,86125,65426,068Below
    01 Oct25,79725,85025,69026,010Below
    03 Oct25,25025,74125,69925,783Below
    04 Oct25,01525,60925,68325,535Below
    07 Oct24,79625,46125,64325,279Below

    Read the last column. On 27 September the close of 26,178 was still above the ZLMA of 26,134, so the trend was nominally intact. On 30 September the close of 25,811 dropped below the ZLMA of 26,068, flashing the first bearish warning. The plain EMA1 was still at 25,861, only marginally below the close, so a trader watching only the EMA would have hesitated. By the time price fell decisively under EMA1 a session or two later, the ZLMA reader was already out or short. This one to two session head start, repeated across many trades, is the practical edge and the practical danger of ZLMA.

    A Dated Crossover Signal Example with Rupee Maths

    Now put the signal to work. Suppose on the close of 30 September 2024 the Nifty close of 25,811 crossing below the 10 period ZLMA of 26,068 is your bearish trigger. You decide to express this view with a Nifty weekly put option rather than shorting the index, because options cap your risk to the premium paid. The Nifty lot size is 65. Assume you buy 1 lot of the Nifty 25,800 put with a few sessions to expiry at an illustrative premium of Rs 150 per unit.

    • Entry: buy 1 lot Nifty 25,800 put at Rs 150. Cost = 150 x 65 = Rs 9,750 plus charges. This Rs 9,750 is also your maximum loss if Nifty closes above 25,800 at expiry.
    • Thesis plays out: by 04 October 2024 Nifty has fallen to around 25,015, roughly 800 points below your strike. A 25,800 put is now deep in the money with an intrinsic value of about 785 points, and with a little time value the premium might be around Rs 820 illustratively.
    • Exit: sell the same put at Rs 820. Proceeds = 820 x 65 = Rs 53,300.
    • Gross profit = 53,300 minus 9,750 = Rs 43,550 before charges.

    Now subtract the real Indian costs, because gross profit is not take home profit. STT on options is charged at 0.1 percent of the premium on the sell side, so 0.1 percent of Rs 61,500 is about Rs 62. If you exercise an in the money option at expiry instead of selling it, STT is charged at 0.125 percent on the intrinsic settlement value, which is far higher, so squaring off before expiry is usually cheaper. A discount broker charges a flat fee, often around Rs 20 per order, so two legs cost about Rs 40. Add exchange transaction charges, SEBI fees, stamp duty and 18 percent GST on brokerage and exchange charges, and total costs on a trade this size typically land in the Rs 150 to Rs 300 range. Net profit is therefore roughly Rs 49,950 to Rs 50,100, still close to the gross figure here because the position is small and held over several days.

    Tax matters too. Profit from trading Nifty options is treated as business income, not capital gains, so this roughly Rs 50,000 gain is added to your other business income and taxed at your applicable slab rate, with losses available to set off and carry forward under the rules for non speculative business income. Contrast that with buying the cash index basket as a delivery trade, where short term equity gains would be taxed at 20 percent and long term gains above Rs 1.25 lakh at 12.5 percent. The point of the example is the workflow: a ZLMA crossover gives the dated signal, the option structure caps risk to Rs 11,250, and you must always net out STT, brokerage and slab rate tax before calling it a win. These numbers are illustrative and option premiums vary with volatility, so never treat them as guaranteed.

    Tip

    Always define your stop before entry. In the example above, the natural invalidation is a Nifty daily close back above the ZLMA. If price had reclaimed the line, the bearish thesis was wrong and you exit, losing only part of the Rs 11,250 premium rather than waiting for it to expire worthless.

    ZLMA Versus EMA Versus HMA: A Quick Comparison

    ZLMA is one of several attempts to reduce lag. The Hull Moving Average (HMA) and the Double EMA (DEMA) chase the same goal with different maths. The table below compares how they behave on a liquid Indian instrument such as Nifty or Reliance, so you can pick the right tool rather than assuming faster is always better.

    IndicatorLagSmoothnessBest Use on NSEMain Weakness
    Simple MA (SMA)HighestSmoothestLong term Nifty trend and 200 SMA supportVery slow to turn
    EMAHighSmoothStandard 20/50 EMA swing tradesLags at trend starts
    ZLMALowModerateEarly trend entries on trending indicesWhipsaws in sideways markets
    DEMALowModerateSimilar to ZLMA, intraday momentumOvershoots after sharp spikes
    HMAVery lowSmooth and fastFast intraday Bank Nifty trend readsCan look too jumpy on noisy stocks

    In practice many Indian intraday traders keep a slow plain EMA, such as the 50 EMA, as a trend filter and use a fast ZLMA, such as 13 period, only for entries in the direction of that filter. This pairing keeps the whipsaw problem in check: you only act on ZLMA signals that agree with the bigger EMA trend, ignoring the counter trend crossovers that cause most false signals.

    Best Settings for Indian Markets

    There is no single magic number, but there are sensible starting points by timeframe and instrument. Indian indices like Nifty and Bank Nifty move fast around the open and around major events such as the RBI policy, the monthly F&O expiry, and the Union Budget, so shorter ZLMA periods work for scalpers while swing traders need longer ones to avoid being shaken out by ordinary intraday noise.

    • Intraday scalping on 1 to 5 minute Bank Nifty charts: 9 to 13 period ZLMA, paired with a 50 EMA trend filter.
    • Intraday swing on 15 minute Nifty charts: 13 to 21 period ZLMA, confirmed with volume on the breakout candle.
    • Positional swing on the daily chart for stocks like Reliance, TCS or HDFC Bank: 20 to 21 period ZLMA.
    • Long term trend confirmation: a 50 period ZLMA can flag a regime change earlier than the classic 50 EMA, but use it only as context, not a standalone entry.

    Whatever period you choose, keep it constant during a backtest and across live trading. Constantly tweaking the period to fit the last few candles, a habit called curve fitting, produces settings that look perfect on history and fail in real time. Backtest one setting over at least a few hundred Nifty trades before trusting it.

    Reading Buy and Sell Signals Correctly

    There are two common ways to trade ZLMA. The first is the price cross: go long when price closes above the ZLMA, go short or exit when price closes below it. This is what the worked Nifty table demonstrated. The second is the two line cross: plot a fast ZLMA and a slow ZLMA, for example 9 and 21, and trade when the fast line crosses the slow line, the same logic as a classic moving average crossover but with less lag on both lines.

    The single most important rule is to wait for the candle to close before acting. Intraday, an open candle can poke above the ZLMA and then fall back below by the close, giving a fake signal that vanishes. On a 15 minute Nifty chart, acting only on closed candles removes a large share of false triggers at almost no cost in speed. Pair this with a volume check: a genuine breakout above ZLMA usually comes with above average volume, while a low volume cross is more likely to fail.

    Confirmation indicators add another filter. If price crosses above ZLMA while RSI is above 50 and rising, the long signal is stronger. If MACD is also turning up, stronger still. None of these guarantees a winning trade, but stacking independent confirmations raises the share of trades that work, which over many trades is what separates a profitable system from a coin flip.

    Where ZLMA Fails: False Signals and Whipsaws

    Because ZLMA hugs price, it produces its worst behaviour exactly when markets go quiet and choppy. A typical mid day Nifty session that drifts in a 40 to 60 point range will generate several ZLMA crossovers, almost all of them losers after costs. Even small per trade STT and brokerage add up when you take many such trades, and a string of whipsaws can quietly bleed an account. This is not a flaw to be fixed, it is the inherent cost of a low lag indicator.

    The defences are practical. Use a trend filter so you only take ZLMA signals in the direction of the larger trend. Demand a volume or volatility expansion before acting, because trends usually start with a pickup in range. Avoid trading ZLMA crossovers in the dead hours, roughly the late morning lull, when ranges compress. And on expiry days, when option theta decay and pinning distort price, treat fast ZLMA signals with extra caution.

    • Filter every signal through a higher timeframe trend or a slow EMA.
    • Skip ZLMA crossovers during obvious sideways consolidation.
    • Require a volume or range expansion to confirm a breakout cross.
    • Always attach a stop loss based on structure, not just the indicator line.

    Risk Management and Position Sizing for Indian Traders

    No indicator survives bad risk management. The standard rule is to risk a small fixed fraction of capital per trade, commonly 1 to 2 percent. If you have Rs 5 lakh of trading capital and risk 1 percent, your maximum loss per trade is Rs 5,000. In the Nifty option example earlier, the Rs 11,250 premium would exceed that limit, so a 1 percent risk trader would either trade a cheaper, further out of the money put or accept that buying a full lot already commits more than 1 percent. Position sizing, not prediction, is what keeps you in the game.

    Remember the leverage in F&O. One Nifty lot of 65 controls roughly 65 times the index level in notional value, so a Rs 200 move in the index is a Rs 13,000 swing on a single lot. SEBI margin rules require you to post a meaningful margin even to sell options, and intraday margins have been tightened over recent years, so do not size positions on the assumption of unlimited leverage. Treat the ZLMA signal as the trigger and your position size as the throttle that controls how much damage a wrong signal can do.

    Combining ZLMA With Other Indicators

    ZLMA gives timing. It does not measure overbought conditions, momentum exhaustion or volatility. Pairing it with complementary indicators covers these blind spots. A popular Indian intraday combination is ZLMA for the entry trigger, RSI to avoid buying into an overbought spike, and VWAP as an intraday value reference, since institutional flow often respects VWAP on Nifty and Bank Nifty.

    • ZLMA plus RSI: take long crosses only when RSI is between 50 and 70, avoiding overbought entries above 80.
    • ZLMA plus MACD: use a MACD line above its signal line to confirm that momentum agrees with the ZLMA cross.
    • ZLMA plus VWAP: intraday, prefer longs when price and ZLMA are both above the day VWAP.
    • ZLMA plus ATR: size your stop in multiples of the Average True Range so it adapts to current Nifty volatility.

    Do not stack ten indicators. Two or three that measure different things, trend, momentum and volatility, are enough. Adding more correlated indicators creates the illusion of confirmation without adding real information, and it slows your decision making when the market is moving.

    Sources and Further Reading

    For authoritative data and rules, refer to Zerodha Varsity for technical analysis and Indian taxation modules, NSE India for official closing prices, lot sizes and contract specifications, NSE Indices for index methodology, and Investopedia for the underlying maths of moving averages. Always confirm current STT, brokerage, margin and tax rules on the official source before you trade, since these change with each Union Budget and SEBI circular.

    Sources and Further Reading

    For authoritative data and further reading on this topic, refer to Zerodha Varsity, Investopedia, NSE India and NSE Indices (Nifty Indices). Always confirm current rules, rates and contract specifications on the official source before you trade.

    Related Topics

    Zero Lag Moving AverageNSEBSETechnical AnalysisStock TradingNiftyBank Nifty

    Related Articles

    OneTradeJournal

    The trading journal built for Indian F&O traders. Track your trades, spot patterns, build discipline.

    • Log one trade a day by hand, on purpose
    • AI mentor finds your repeat mistakes
    • Behavioural analytics catch tilt early
    • Trading calendar with P&L heatmap
    • Pre-trade checklist flags risks
    Start journaling

    Yearly ₹2,499 · No broker credentials