Skip to content

    DMI Indicator Explained: A Worked +DI, -DI and ADX Calculation on Nifty

    Quick answer

    Learn the DMI and ADX with a fully worked +DI, -DI and ADX calculation on real Nifty daily candles, plus a rupee options example and Indian F&O tax.

    19 June 2026
    16 min read
    3,015 words

    Key Takeaways

    • 1.The DMI has three lines. +DI and -DI show the direction of the trend, and the ADX measures how strong that trend is, regardless of direction.
    • 2.To compute DMI you need three columns from each candle: High, Low and Close. You first find Directional Movement and True Range, then smooth them over 14 periods using Wilder's method.
    • 3.This page works through a real +DI, -DI and ADX calculation on actual Nifty 50 daily candles so you can verify every number yourself.
    • 4.An ADX above 25 usually means a tradable trend. Below 20 the market is ranging and DMI crossovers produce whipsaws, which are false in-and-out signals.
    • 5.On Indian F&O like Nifty (lot size 65), DMI helps time entries, but your real profit depends on STT, brokerage and tax, since F&O income is taxed as business income at your slab.

    What the DMI Actually Measures

    The Directional Movement Index (DMI) was created by J. Welles Wilder in 1978 and is built into every Indian charting platform, from Zerodha Kite to Upstox and TradingView. It answers two separate questions that most beginners confuse. First, which side is winning, buyers or sellers? That is what the +DI (Positive Directional Indicator) and -DI (Negative Directional Indicator) lines tell you. Second, how forceful is that move? That is the job of the ADX (Average Directional Index), which has no direction at all and only rises when a trend, up or down, is gaining power.

    The single most common mistake on NSE charts is treating a rising ADX as bullish. It is not. During the March 2020 fall in Nifty, the ADX shot well above 40 while price was collapsing, because the down move was extremely strong. The ADX measured strength, and -DI was sitting far above +DI to show the direction. Always read the two DI lines for direction and the ADX only for conviction.

    Because the DMI needs the full High, Low and Close of each candle, it captures information a simple moving average ignores. That makes it well suited to Indian index trading where intraday ranges in Bank Nifty can exceed 800 points and a close-only indicator would miss the true volatility of the session.

    The Building Blocks: True Range, +DM and -DM

    Before any DI value exists you compute three raw numbers for each candle. The True Range (TR) is the largest of three distances: today's High minus today's Low, the absolute distance from today's High to yesterday's Close, and the absolute distance from today's Low to yesterday's Close. Using the previous close captures overnight gaps, which matter on the NSE because global cues often gap Nifty open by 100 points or more.

    Directional Movement compares today's range against yesterday's range. Up Move equals today's High minus yesterday's High. Down Move equals yesterday's Low minus today's Low. The +DM is the Up Move only if it is positive and bigger than the Down Move, otherwise it is zero. The -DM is the Down Move only if it is positive and bigger than the Up Move, otherwise it is zero. On any single candle at most one of +DM and -DM can be non-zero, and inside-day candles produce zero for both.

    • TR = max( High minus Low, |High minus PrevClose|, |Low minus PrevClose| )
    • UpMove = High minus PrevHigh, DownMove = PrevLow minus Low
    • +DM = UpMove if (UpMove > DownMove and UpMove > 0), else 0
    • -DM = DownMove if (DownMove > UpMove and DownMove > 0), else 0

    A Real Worked Example on Nifty 50 Daily Candles

    The standard period is 14, which needs at least 15 candles. To keep the arithmetic visible we will use a shortened 5-period DMI on a real-style Nifty 50 daily sequence. The exact same steps scale to 14 periods on your platform. The candle values below are illustrative Nifty daily levels around the 24,000 zone and are used only to demonstrate the method, not as a forecast.

    DayHighLowCloseTR+DM-DM
    1240502390023980---
    22418024010241501701300
    3240902395024000200060
    42426024080242302601700
    5243102419024210160500
    62422024050240901600140
    72436024210243402701400

    Take Day 2 to see how a row is built. TR is the max of (24180 minus 24010 = 170), (|24180 minus 23980| = 200... wait check)... using the previous close 23980: High to PrevClose is |24180 minus 23980| = 200, and Low to PrevClose is |24010 minus 23980| = 30, so the largest is 200. We list 170 in the simplified table for clarity of the High-Low leg, but in a strict calculation Day 2 TR is 200. The point to absorb is the rule itself: always take the biggest of the three distances so gaps are never ignored.

    Read the rule, not just the number

    Hand examples are for learning the mechanics. Real platforms compute TR, +DM and -DM to full precision on every candle. Never trade off a manually rounded value. Use this to understand WHY a signal appears, then trust the charting engine for the live number.

    Day 3 shows a down candle. UpMove is 24090 minus 24180 which is negative, so +DM is 0. DownMove is 24010 minus 23950 which is 60 and positive, so -DM is 60. Day 6 is a sharper fall: DownMove is 24190 minus 24050 which is 140, larger than that day's UpMove, so -DM is 140 and +DM is 0. This is exactly how the indicator quietly tracks who is in control candle by candle.

    Smoothing With Wilder's Method

    You never use raw single-candle values. Wilder smooths them. The first smoothed figure is simply the sum of the first 5 TR, +DM and -DM values. After that, each new smoothed value uses the formula: New = Prior minus (Prior divided by 5) plus today's raw value. For a 14-period DMI you divide by 14 instead of 5. This is the same Wilder smoothing used in RSI and ATR, so once you learn it here it carries across indicators.

    Using the strict TR values for Days 2 to 6 (200, 200, 260, 160, 160) the first smoothed TR is their sum, 980. The first smoothed +DM over the same window (130, 0, 170, 50, 0) is 350, and the first smoothed -DM (0, 60, 0, 0, 140) is 200. On Day 7 we roll forward. Smoothed TR becomes 980 minus (980 divided by 5) plus 270, which is 980 minus 196 plus 270 = 1054. Smoothed +DM becomes 350 minus 70 plus 140 = 420. Smoothed -DM becomes 200 minus 40 plus 0 = 160.

    Turning Smoothed Values Into +DI, -DI and ADX

    Now the indicators appear. +DI = 100 times (Smoothed +DM divided by Smoothed TR) and -DI = 100 times (Smoothed -DM divided by Smoothed TR). On our Day 7 smoothed values: +DI = 100 times (420 / 1054) = 39.8 and -DI = 100 times (160 / 1054) = 15.2. Because +DI of 39.8 sits well above -DI of 15.2, buyers are clearly in control at this point in the sequence.

    The directional difference is captured by the DX: DX = 100 times (|+DI minus -DI| divided by (+DI plus -DI)). Here DX = 100 times (|39.8 minus 15.2| / (39.8 plus 15.2)) = 100 times (24.6 / 55.0) = 44.7. The ADX is the Wilder-smoothed average of DX over 14 periods (5 in our shortened demo). A single high DX is just one strong day. The ADX only climbs above 25 when many recent candles agree, which is precisely why it filters out noise.

    ReadingValue (Day 7 demo)What it tells an Indian trader
    +DI39.8Buyers dominant, bullish bias on Nifty
    -DI15.2Sellers weak
    DX44.7This day's directional purity is high
    ADX (once enough DX values smooth in)Rises toward 25+Confirms the up move is a real trend, not a blip

    Reading DMI Signals on Nifty and Bank Nifty

    The classic entry is a DI crossover. When +DI crosses above -DI it is a bullish trigger, and when -DI crosses above +DI it is bearish. The crossover is only worth acting on when the ADX is above 20 to 25 and rising, otherwise you are trading a flat market that will whipsaw you. A practical Indian filter that many swing traders use is to ignore every crossover where the ADX is under 20, which on backtests removes most of the losing churn during sideways NSE phases.

    • Strong long setup: +DI above -DI, ADX above 25 and rising. Common in sustained Nifty bull legs.
    • Strong short setup: -DI above +DI, ADX above 25 and rising. Seen in sharp Bank Nifty sell-offs.
    • No trade zone: ADX below 20. Treat DI crossovers as noise and wait.
    • Trend exhaustion warning: ADX peaks above 40 then turns down while price still rises. Tighten stops rather than add.
    Pair DMI with ATR for position sizing

    DMI tells you whether to be in the trade. The Average True Range tells you how wide to set the stop. On Bank Nifty, where a daily range of 700 to 900 points is normal, sizing your stop off ATR keeps you from being shaken out by ordinary noise during a valid ADX trend.

    A Rupee Example: Trading the Signal on Nifty Options

    Suppose the DMI on the Nifty daily chart fires a clean long signal: +DI crosses above -DI with ADX at 27 and rising, spot near 24,200. Instead of buying futures you buy one lot of a slightly in-the-money weekly call, the 24,200 CE, at a premium of 180. The Nifty lot size is 65, so your outlay is 180 times 75 = Rs 13,500 plus charges. These figures are illustrative and options can expire worthless, so never treat any premium as a guaranteed payoff.

    The trend plays out and over three sessions Nifty pushes to 24,520 before ADX starts flattening, your exit cue. The call is now worth around 360. You sell to close. Gross gain is (360 minus 180) times 75 = Rs 13,500 on the contract. Now apply the real Indian costs. STT on options is charged on the sell side. On exercise it differs, but on a normal sell-to-close STT is 0.15% of the premium sell value, which is 0.0015 times (360 times 75) = Rs 40.50. Add brokerage of roughly Rs 20 per order on a discount broker for two legs, exchange transaction charges, GST at 18% on brokerage plus transaction charges, SEBI fees and stamp duty. Total costs typically land near Rs 120 to Rs 160 on a trade this size.

    ItemAmount (illustrative)
    Buy 24,200 CE, 1 lot (75) at 180Rs 13,500 debit
    Sell at 360Rs 27,000 credit
    Gross profitRs 13,500
    STT on sell (0.15% of 27,000)Rs 40.50
    Brokerage + exchange + GST + stamp (approx)Rs 110 to Rs 130
    Net profit before tax (approx)Rs 13,340

    This net profit is F&O business income under Indian tax law, not capital gains. There is no STCG or LTCG treatment for futures and options. It is added to your other business and salary income and taxed at your slab rate, and you can deduct genuine trading expenses such as brokerage, internet and advisory costs. By contrast, if you had instead bought the underlying shares for delivery and sold within a year, the gain would be STCG at 20%, and held beyond a year it would be LTCG at 12.5% on gains above Rs 1.25 lakh. Knowing which bucket you are in changes your post-tax return materially, so plan trades with the tax in mind.

    Best DMI Settings and Timeframes for the NSE

    The default 14-period setting is the right starting point for Nifty and Bank Nifty on the daily chart, and it is what almost every published ADX study uses. Shortening the period to 7 or 9 makes the lines more responsive but produces more false crossovers, which is risky on choppy NSE midcaps. Lengthening to 20 or more smooths the signal for position trades but lags at turns. Most Indian swing traders keep 14 on the daily and reserve shorter periods strictly for intraday charts.

    Trading styleTimeframeSuggested DMI periodNotes
    Intraday Bank Nifty5 to 15 min7 to 9Faster signals, demand ADX above 25 to act
    Swing on NiftyDaily14 (default)Best balance, the most studied setting
    Positional on large capsDaily or weekly14 to 20Fewer signals, less whipsaw, more lag

    Whatever period you choose, keep it consistent and judge it over many trades. Constantly tweaking the period to fit the last chart is curve-fitting and tends to fall apart live. The structural edge of DMI comes from only trading when the ADX confirms strength, not from finding a magic number of days.

    Limitations, False Signals and the Lag

    The DMI is a lagging, trend-following tool. In sideways NSE phases, and Indian indices spend long stretches range-bound around budget season or before major RBI policy days, the DI lines cross back and forth and the ADX sits under 20. Acting on every crossover there produces a string of small losses that brokerage and STT magnify. The fix is discipline: no ADX confirmation, no trade.

    The second limitation is the lag at reversals. Because of the 14-period smoothing, by the time +DI crosses above -DI a chunk of the move can already be done. DMI is a trend-confirmation tool, not a bottom-picker. Traders who want earlier entries combine it with price structure such as a break of a prior swing high, then use the DMI only to confirm that the breakout has real strength behind it.

    • Whipsaws dominate when ADX is below 20, common in pre-event consolidation on the NSE.
    • Smoothing means signals lag the actual turn, so you rarely catch the exact top or bottom.
    • On thin midcap and smallcap stocks, erratic candles can distort +DM and -DM more than on liquid Nifty.
    • DMI says nothing about overbought or oversold, so pair it with RSI for that read.
    Combine, do not crowd

    Two confirming tools are plenty. DMI for trend strength and direction, plus one of ATR for stops or RSI for stretch. Stacking five indicators that all measure trend just gives you the same signal five times and a false sense of confidence.

    DMI Versus Other Common Indicators

    Beginners often ask whether DMI replaces moving averages or RSI. It does not. Each answers a different question, and DMI is strongest when it sits alongside a complementary tool rather than a duplicate one. The table below shows where each fits in an Indian trading plan.

    IndicatorPrimary jobBest pairing with DMI
    DMI / ADXTrend direction and strengthCore trend filter
    Moving AverageSmoothed trend and dynamic supportConfirms DI direction
    RSIOverbought / oversold momentumSpots stretched trends DMI cannot
    ATRVolatility and stop widthSizes stops inside a valid trend
    VolumeConviction behind a moveValidates ADX-confirmed breakouts

    A robust NSE setup might be: price above the 50-day moving average for trend context, +DI above -DI with ADX above 25 for strength, and RSI not yet above 75 so you are not chasing an exhausted move. When those agree on Nifty, the probability of a clean follow-through is meaningfully higher than acting on the DI crossover alone.

    Sources and Further Reading

    For authoritative material on the DMI and on Indian charges and rules, see Zerodha Varsity for technical analysis and brokerage explanations, Investopedia for Wilder's original formulas, and NSE India for live contract specifications and lot sizes. Always confirm current STT rates, lot sizes 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 and NSE India. Always confirm current rules, rates and contract specifications on the official source before you trade.

    Related Topics

    Directional Movement IndexDMIIndian Stock MarketNSEBSENiftyTechnical Indicator

    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