Skip to content

    Triple Exponential Moving Average (TEMA): Formula, Worked Nifty Example And Indian Trading Use

    Quick answer

    Triple Exponential Moving Average (TEMA) for Indian markets with a full worked Nifty calculation, best settings, Bank Nifty trade math, costs and tax.

    19 June 2026
    15 min read
    2,890 words

    Key Takeaways

    • 1.TEMA (Triple Exponential Moving Average) reduces the lag of a normal EMA by combining three EMAs with the formula TEMA = 3 x EMA1 minus 3 x EMA2 plus EMA3.
    • 2.This page shows a full numeric TEMA worked out by hand on a real 10 day Nifty 50 closing series, so you can see exactly where every number comes from.
    • 3.TEMA reacts faster than SMA and EMA, which helps in trending Nifty and Bank Nifty moves but creates more whipsaws in sideways ranges.
    • 4.A common Indian setup is 9 or 21 period TEMA on the 15 minute Nifty chart for intraday and 50 period TEMA on the daily for swing trades.
    • 5.F&O profits from TEMA based trades are taxed as business income at your slab, not as capital gains, and STT plus brokerage must be subtracted before you judge a strategy.

    What TEMA Actually Is And Why The Lag Problem Matters

    The Triple Exponential Moving Average (TEMA) was created by Patrick Mulloy in the January 1994 issue of Technical Analysis of Stocks and Commodities. His goal was simple. A plain moving average always trails price because it is an average of old data, and that delay, called lag (the gap between price turning and the line turning), causes late entries and late exits. On a fast moving instrument like Nifty 50 or Bank Nifty, a few bars of lag can be the difference between a clean entry and chasing a move that is almost over.

    A normal EMA already weights recent prices more heavily than a Simple Moving Average. TEMA goes further. It takes an EMA, then an EMA of that EMA, then an EMA of that second EMA, and combines all three so that most of the lag cancels out. The trick is that the second and third EMAs are even more delayed than the first, so by subtracting them in the right proportion you push the final line closer to live price. The result hugs price tightly while still smoothing out the random noise of every tick.

    This matters in Indian markets because Nifty and Bank Nifty are heavily traded around expiry, where price can move several hundred points in minutes. A trader who needs a smoothed trend line but cannot afford a 5 or 6 bar delay turns to TEMA. The cost of this speed is that TEMA also reacts to noise, so in a quiet range bound session it will flip up and down and produce false signals more often than an SMA.

    The TEMA Formula, Broken Down

    TEMA is built from three layers of EMA on the same period N. The formula is TEMA = (3 x EMA1) minus (3 x EMA2) + EMA3, where EMA1 is the EMA of price, EMA2 is the EMA of EMA1, and EMA3 is the EMA of EMA2. Every layer uses the same smoothing factor. For an N period EMA the smoothing factor, called the multiplier or k, is k = 2 divided by (N + 1).

    Each EMA step uses the standard recursive rule: today's EMA = (today's value x k) + (yesterday's EMA x (1 minus k)). The very first EMA value is usually seeded with a simple average of the first N values, or in a short worked example simply with the first price. The exact seed only affects the earliest bars and washes out quickly, which is why the numbers below stabilise within a few rows.

    • Step 1: compute EMA1 = the N period EMA of the closing price.
    • Step 2: compute EMA2 = the N period EMA of EMA1 (an average of an average).
    • Step 3: compute EMA3 = the N period EMA of EMA2 (an average of an average of an average).
    • Step 4: combine them: TEMA = 3 x EMA1 minus 3 x EMA2 + EMA3.
    • Note: TEMA is not a triple smoothed line. The subtraction of the slower EMAs is what cancels lag, so TEMA actually sits closer to price than a single EMA.

    Worked Numeric Example On A Real Nifty 50 Daily Series

    Here is a fully worked TEMA calculation so you can reproduce it in Excel or a notebook. We use a 5 period TEMA on ten consecutive Nifty 50 daily closes. These levels are realistic for Nifty in 2024 and 2025 and are used here as illustrative numbers, not live quotes. A 5 period is unusually short for real trading but it makes the arithmetic easy to follow and shows the lag reduction clearly. The smoothing factor is k = 2 / (5 + 1) = 0.3333.

    Our ten Nifty closes are: 22,500, 22,560, 22,620, 22,700, 22,650, 22,740, 22,830, 22,900, 22,860, 22,980. We seed each EMA with its first input value so you can see the full chain. The table below shows every intermediate number rounded to two decimals.

    DayNifty CloseEMA1 (k=0.3333)EMA2EMA3TEMA = 3xEMA1 - 3xEMA2 + EMA3
    122,500.0022,500.0022,500.0022,500.0022,500.00
    222,560.0022,520.0022,506.6722,502.2222,544.45
    322,620.0022,553.3322,522.2222,508.8922,601.22
    422,700.0022,602.2222,548.8922,522.2222,684.22
    522,650.0022,618.1522,571.9722,538.8122,677.35
    622,740.0022,658.7622,600.9022,559.5122,733.10
    722,830.0022,715.8422,639.2122,586.0822,816.97
    822,900.0022,777.2322,685.2222,619.1322,895.16
    922,860.0022,804.8222,725.0922,654.4522,893.64
    1022,980.0022,863.4122,771.2022,693.3722,970.00

    Read Day 10 carefully because it shows the whole point of TEMA. The actual close is 22,980. The fastest single line, EMA1, sits at 22,863.41, which is about 117 points below price. EMA2 lags further at 22,771.20 and EMA3 even further at 22,693.37. Yet the combined TEMA finishes at 22,970.00, only 10 points below the live close. By subtracting the slower averages, TEMA cancels almost all the lag that the plain EMA still carries.

    How Day 2 EMA1 was computed

    EMA1 on Day 2 = (today close x k) + (yesterday EMA1 x (1 minus k)) = (22,560 x 0.3333) + (22,500 x 0.6667) = 7,519.4 + 15,000.7 = 22,520.00. EMA2 then treats those EMA1 values as its input, and EMA3 treats the EMA2 values as its input. Copy the formula down a column and the whole chain builds itself.

    Turning The Number Into A Bank Nifty Trade, With STT And Brokerage

    A line on a chart is only useful if it changes a real trade outcome. Suppose a swing trader watches Bank Nifty and uses a daily 21 period TEMA. Price has been holding above the rising TEMA, so the trader stays long via the futures. Assume an entry on the Bank Nifty future at 48,000 and an exit at 48,400 when TEMA flattens and price closes back below it. The Bank Nifty lot size is 30, so one lot represents 48,000 x 30 = 14,40,000 rupees of notional value.

    The gross move is 400 points. On one lot that is 400 x 30 = 12,000 rupees gross profit (illustrative, not a promise of returns). Now subtract real costs. Futures STT is charged on the sell side at 0.02 percent of turnover. Sell turnover is 48,400 x 30 = 14,52,000, so STT is roughly 290 rupees. A discount broker charges a flat fee of about 20 rupees per executed order, so 40 rupees for entry plus exit. Exchange transaction charges, GST, SEBI fee and stamp duty together add roughly another 180 to 220 rupees on a trade this size. Total costs land near 510 to 550 rupees.

    So the net profit is about 6,000 minus 290, which is close to 5,710 rupees on one lot. Because this is an F&O trade, that profit is business income taxed at your income tax slab rate, not capital gains. There is no STCG or LTCG treatment on futures and options. If the same trader instead held a delivery position in a cash stock and sold within a year, that gain would be Short Term Capital Gains taxed at 20 percent, and a holding beyond a year would be Long Term Capital Gains taxed at 12.5 percent on the amount above the 1.25 lakh rupee yearly exemption.

    ItemValue (illustrative)
    InstrumentBank Nifty futures, 1 lot (30 qty)
    Entry / Exit48,000 / 48,400
    Gross points captured400
    Gross profit12,000 rupees
    STT (0.05% sell side)approx 726 rupees
    Brokerage + exchange + GST + stampapprox 145 rupees
    Net profitapprox 11,129 rupees
    Tax treatmentBusiness income at slab (F&O)

    How To Read TEMA On A Live Chart

    On the chart, TEMA is read the same way as any moving average but you trust its slope more because of the reduced lag. When price holds above a rising TEMA, the trend is up and pullbacks to the line are buy zones. When price sits below a falling TEMA, the trend is down and bounces into the line are sell zones. The single most useful signal is the slope change, because TEMA turns earlier than EMA, often giving an extra bar or two of warning at a Nifty swing high or low.

    Many Indian intraday traders run two TEMAs together, for example a fast 9 period and a slower 21 period on the 15 minute Nifty chart. A long bias appears when the fast TEMA crosses above the slow one and both slope up. The reverse warns of a short. Because expiry day Nifty and Bank Nifty can be violent, treat crossovers near big round levels and option max pain zones with extra care, since price often whips around those points.

    • Rising TEMA with price above it: stay with the long side, buy dips to the line.
    • Falling TEMA with price below it: stay with the short side, sell rallies to the line.
    • TEMA slope flattening: trend is tiring, tighten stops or book partial profits.
    • Fast TEMA crossing slow TEMA: early momentum shift, confirm with volume before acting.

    Best TEMA Settings For Indian Traders

    There is no single perfect setting, but Indian traders converge on a few practical defaults. For intraday Nifty and Bank Nifty, a 9 or 21 period TEMA on the 5 minute or 15 minute chart is popular because it keeps pace with fast option driven moves. For swing trading on the daily chart, 50 period TEMA filters out daily noise and tracks the multi week trend. For positional or longer term views, some traders use a 100 or 200 period TEMA, although at very long periods the lag advantage shrinks and a simple EMA does almost the same job.

    Always backtest a setting on the exact instrument you trade. A 21 period TEMA that works beautifully on trending Bank Nifty can chop you to pieces on a range bound midcap stock. Because TEMA is sensitive, smaller periods produce many signals and larger periods produce fewer but more reliable ones. Match the period to your holding time, not to a number you saw in a video.

    Trading StyleSuggested TEMA PeriodTypical Timeframe
    Scalping Nifty / Bank Nifty91 to 5 minute
    Intraday2115 minute
    Swing50Daily
    Positional100 to 200Daily / Weekly

    TEMA Versus SMA And EMA

    The simplest way to see TEMA's edge is to compare all three on the same data. A Simple Moving Average weights every bar equally, so it is the slowest and smoothest. A normal EMA weights recent bars more, so it is faster than SMA but still lags. TEMA, through its three layer subtraction, is the fastest of the three and sits closest to live price, which our Day 10 example demonstrated when TEMA was only 10 points behind price while EMA1 was 117 points behind.

    Speed cuts both ways. In a strong Nifty trend, TEMA's quick response gets you in and out earlier, which protects more profit. In a flat, sideways market, that same responsiveness makes TEMA flip back and forth across price, generating false signals and whipsaw losses. SMA and EMA, being slower, ignore much of that noise. The right choice depends on whether you are trading a trend or stuck in a range, and on how much chop your account and your nerves can tolerate.

    FeatureSMAEMATEMA
    LagHighestMediumLowest
    Noise sensitivityLowestMediumHighest
    Best marketRange / long termGeneralStrong trend
    Whipsaw riskLowMediumHigh

    Combining TEMA With Other Indicators

    Because TEMA fires fast, it works best when a second tool confirms the signal. A common pairing is TEMA for trend direction plus the Relative Strength Index (RSI) for momentum. If TEMA is rising and RSI is above 50 and pushing higher, the long signal is stronger. If TEMA turns up but RSI is stalling below 50, the move may lack the strength to follow through, which keeps you out of weak Nifty bounces.

    Many traders also use the MACD for trend confirmation, since a TEMA slope change that lines up with a MACD signal line cross is more reliable than either alone. Volume is the cheapest confirmation of all. A TEMA crossover on a Nifty or stock breakout that comes with a clear jump in volume is far more trustworthy than the same crossover on thin, drifting volume. Stack confirmations rather than trading TEMA in isolation.

    • TEMA + RSI: trend plus momentum, filters weak signals.
    • TEMA + MACD: two trend tools agreeing reduces false starts.
    • TEMA + volume: breakouts with rising volume are higher quality.
    • TEMA + support and resistance: only act on crossovers near meaningful price levels.

    Limitations, False Signals And Risk Control

    TEMA's biggest weakness is the flip side of its biggest strength. The same speed that gets you in early also drags you into noise. In a sideways Nifty session, price can cross the TEMA line many times, and each cross looks like a fresh signal. Trading every one of them bleeds your account through brokerage, STT and small losing trades. The defence is to only take TEMA signals when a higher timeframe is clearly trending and to add a filter such as support and resistance or a minimum slope threshold.

    Risk control beats signal quality every time. Define your stop loss before entry, often just beyond the TEMA line or a recent swing point, and size the position so a single loss is a small fraction of capital. Remember the cost drag from our Bank Nifty example: roughly 290 rupees a round trip. If your average win is small, those costs and the occasional whipsaw can quietly turn a winning looking system into a losing one. Always judge a TEMA strategy on net results after STT, brokerage and taxes, never on gross points.

    Whipsaw filter

    In a range, demand that price closes beyond TEMA by a set buffer (for example 0.15 percent of price for Nifty) before you act, and ignore signals where the TEMA slope is nearly flat. This one rule removes a large share of false TEMA signals in sideways Indian sessions.

    Sources And Further Reading

    For authoritative data and further reading, refer to Zerodha Varsity, Investopedia, NSE India and NSE Indices (Nifty Indices). Always confirm current contract specifications, STT rates and tax rules on the official source before you trade, since lot sizes and charges are revised periodically.

    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

    TEMAIndian marketsNSEBSEtechnical indicatorsstock 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