DMI: definition, what it measures and what it does not
The DMI asks the chart two questions. Which way is price moving? That is the job of +DI and −DI. Is that movement clear enough to be called a trend? That is the job of the ADX. TradingView's help page on Directional Movement (DMI) presents it as three indicators combined into one, and states that the purpose of the ADX is to define whether or not a trend is present, without taking direction into account at all.
StockCharts' ChartSchool puts it the same way: when +DI is above −DI, the trend is up; when it is below, the trend is down; and the ADX measures the strength of the trend, regardless of direction. A high ADX therefore goes with a sharp fall just as well as with a sharp rise, and a falling ADX does not say price is falling. TradingView states that the DMI has a value between 0 and 100.
The name itself changes from one source to the next. thinkorswim's documentation on the DMI writes 'Directional Movement Index (DMI)' for the set of three plots. StockCharts calls the +DI and −DI pair the 'Directional Movement Indicator (DMI)', and gives the name 'Directional Movement Index' to an intermediate value in the calculation, the DX. TradingView and StockCharts both credit the tool to J. Welles Wilder: according to the former, he featured it in New Concepts in Technical Trading Systems, published in 1978, alongside the RSI and the ATR; according to the latter, he designed it with commodities and daily prices in mind. Pages consulted in October 2026.
Calculating the DMI: from +DM and −DM to the ADX
Step 1: the directional movement of each candle. The candle is compared with the previous one through two differences: the rise in the high (high − previous high) and the drop in the low (previous low − low). Only the larger of the two is kept, and only if it is positive. If it is the rise in the high, it becomes the positive directional movement, +DM, and −DM is 0. If it is the drop in the low, it becomes −DM, and +DM is 0. A candle therefore never has both at once. TradingView and StockCharts write the same rule.
StockCharts illustrates two cases. A candle that extends beyond the previous one on both sides has two positive differences: only the larger one counts. A candle contained within the previous one has two negative differences: +DM and −DM are both 0, it has no directional movement. And when the two differences are equal, the ADX Wilder indicator code published by MetaQuotes, the developer of MetaTrader 5, sets both to 0.
Step 2: the true range. This is the range of the candle, opening gap included: the largest of three distances, detailed in the lesson on the ATR. StockCharts notes that the calculation is the same as for the Average True Range indicator.
Step 3: Wilder's smoothing. +DM, −DM and the true range are smoothed the same way over N periods, 14 according to Wilder's recommendation as reported by StockCharts. The first value is the sum of the first 14. After that, on each candle: smoothed value = previous value − previous value ÷ 14 + the candle's value. StockCharts gives this formula, and so does TradingView's help page on the Average Directional Index (ADX).
Step 4: +DI, −DI and DX. +DI = 100 × smoothed +DM ÷ smoothed true range, and −DI = 100 × smoothed −DM ÷ smoothed true range. Dividing by the true range sets directional movement against the range of the candles: a +DI of 30 means positive directional movement accounts for 30 % of the smoothed range. Then DX = 100 × |+DI − −DI| ÷ (+DI + −DI). The absolute value erases direction: the DX is high when one of the two lines clearly dominates the other, whichever it is.
Step 5: the ADX. It is the DX smoothed once more. The first ADX is the simple average of the first 14 DX values; after that, ADX = (previous ADX × 13 + the candle's DX) ÷ 14. With this calculation, +DI and −DI only exist from the fifteenth candle, and the ADX from the twenty-eighth. StockCharts warns that it takes around 150 periods of history for these smoothings to give stable values: an ADX calculated over 30 periods does not land on the same value as an ADX calculated over 150.
The DMI worked by hand on seven candles
The prices are invented, and the setting is 5 periods instead of 14 so that the calculation fits in seven candles. The method is unchanged.
Here are the seven candles, in the order high, low, close. Candle 1: 101.00, 99.00, 100.00. Candle 2: 102.00, 99.50, 101.50. Candle 3, which extends beyond the previous one on both sides: 103.00, 97.50, 98.50. Candle 4, contained within the previous one: 102.00, 98.00, 101.00. Candle 5: 104.50, 100.50, 104.00. Candle 6: 107.00, 103.00, 106.50. Candle 7: 108.60, 104.60, 108.00. The previous close falls inside the candle every time: the true range is therefore simply the high minus the low.
Directional movement, candle by candle. Candle 2: the high rises by 1.00 and the low does not drop, so +DM = 1.00; true range 2.50. Candle 3: the high rises by 1.00, the low drops by 2.00, the larger one wins, so −DM = 2.00 and +DM = 0; true range 5.50. Candle 4: neither a higher high nor a lower low, so +DM = 0 and −DM = 0; true range 4.00. Candles 5 and 6: the high rises by 2.50 each time, so +DM = 2.50; true range 4.00. Candle 7: +DM = 1.60; true range 4.00.
At candle 6, five values are available, those of candles 2 to 6. Sum of +DM: 1.00 + 0 + 0 + 2.50 + 2.50 = 6.00. Sum of −DM: 2.00. Sum of true ranges: 2.50 + 5.50 + 4.00 + 4.00 + 4.00 = 20.00. So +DI = 100 × 6.00 ÷ 20.00 = 30, −DI = 100 × 2.00 ÷ 20.00 = 10, and DX = 100 × (30 − 10) ÷ (30 + 10) = 50.
At candle 7, Wilder's smoothing takes over: one fifth of each total is removed, then the candle's value is added. Smoothed +DM = 6.00 − 1.20 + 1.60 = 6.40. Smoothed −DM = 2.00 − 0.40 + 0 = 1.60. Smoothed true range = 20.00 − 4.00 + 4.00 = 20.00. So +DI = 32, −DI = 8, and DX = 100 × 24 ÷ 40 = 60. −DI lost two points without any low dropping: the downward push of candle 3 is gradually fading from the total.
There is no ADX yet. At 5 periods it takes five DX values, so you have to wait for candle 10, to average them. That is the price of the second smoothing: the ADX starts late and moves slowly.
DMI and ADX settings, platform by platform
The original setting comes down to one number, 14 periods, for the DI lines and for the ADX alike. Platforms keep it, but they do not present it the same way and they do not all smooth alike.
TradingView: the DMI indicator has two inputs, the length of the DI lines ('DI Length') and the period used to calculate the ADX, which the help page notes has a smoothing component, both 14 by default. The ADX can therefore be smoothed over a different span than the DI lines. The platform also offers a standalone ADX indicator, which does not plot +DI and −DI. StockCharts: 14 periods by default, with or without the two DI lines. thinkorswim: a single length for the three lines and a choice of average type, Wilder's by default.
MetaTrader 5 ships two indicators, both set to 14 in the code published by MetaQuotes: 'Average Directional Movement Index' and 'Average Directional Movement Index Wilder'. MetaTrader 5's help page on the ADX Wilder presents it as built in strict correspondence with the algorithm Wilder described in his book: its code smooths +DM, −DM and the true range separately with a smoothed moving average, in which the latest candle weighs 1 ÷ 14, before dividing them. The ADX indicator code published by MetaQuotes works differently: it first calculates the ratio 100 × DM ÷ true range of each candle, then smooths that ratio with an exponential moving average, in which the latest candle weighs 2 ÷ 15, almost double. It then smooths the DX with the same exponential average.
Same setting, two lines. The diagram above is calculated Wilder's way: its ADX reads 46.1 at candle 54. The calculation in the ADX indicator code, rerun on the same sixty-eight candles, gives 80.6 at that candle, and climbs as high as 27.6 between candles 28 and 36, right in the trendless phase, when the one in the diagram never exceeds 13.6. A threshold learned on one does not carry over to the other. TradingView's help, for its part, speaks of an exponential moving average on its DMI page and gives Wilder's formula on its ADX page: before comparing two lines, check which smoothing your platform applies.
Reading the DMI: crossovers, the 20 and 25 levels, ADX slope
The level of the ADX. According to StockCharts, Wilder suggested that a strong trend is present when the ADX is above 25 and that no trend is present when it is below 20, with a grey zone in between; the same page adds that many analysts use 20 as the key level. TradingView reports the same thresholds and warns that they do not apply as they stand everywhere: what counts as a strong trend depends on the instrument, and is checked against its history. thinkorswim sets the bar elsewhere: an ADX that is rising and above 50. Three pages, three thresholds: these are conventions, not constants.
The +DI and −DI crossover. +DI moving above −DI is read as bullish, the reverse as bearish. The system that StockCharts and TradingView attribute to Wilder attaches two conditions to it. First, an ADX above 25, so that crossovers are only read in a trending market. Then a price reference: for a bullish crossover, the initial stop goes at the low of the crossover day, and the reading stays valid as long as that low holds, even if the two lines cross back. MetaTrader 5's help page on the Average Directional Movement Index reports another of Wilder's rules, the extreme point rule: wait for price to exceed the high of the crossover day before acting.
Those safeguards exist because crossovers are numerous. StockCharts says so: they are quite frequent and need to be filtered with complementary analysis. TradingView adds that false signals are most common when the ADX is below 25. The diagram above shows it: four crossovers that led nowhere during the trendless phase. But the filter has a cost, which StockCharts acknowledges: requiring a high ADX tends to filter out as many good crossovers as bad ones. In the diagram, the fifth crossover, the one that opens the rise, happens with the ADX at 10.8.
The slope of the ADX. A rising ADX says the trend is strengthening, whichever way it points: for StockCharts and TradingView, it reinforces the reading of the crossover. A falling ADX says the trend is weakening, not that price is falling: in the diagram, it drops from 46.1 to 33.7 while price holds its plateau. And it arrives late. StockCharts speaks of a fair amount of lag, caused by all that smoothing: in the diagram, the ADX only crosses 25 nine candles after the crossover, when more than two thirds of the rise is done.
None of these readings is an order to buy or sell. They are conventions, to be tested on your market, your timeframe and your setting, with the method in the article on how to backtest a trading strategy. Tradoshi calculates neither the DMI nor the ADX on your trades: the indicator is read on your chart. The journal is for the next step: you tag every trade taken on one precise reading, for example '+DI crosses above −DI, ADX below 20', and the dashboard filters by tag to show what that reading produced for you.
ADXR, an ADX smoothed once more
Some platforms offer the ADXR, short for Average Directional Index Rating. thinkorswim's documentation on the ADXR defines it as a smoothed version of the ADX: the arithmetic mean of the ADX and its value several bars earlier, that number of bars being the ADX period. At 14 periods: ADXR = (the candle's ADX + the ADX of 14 candles ago) ÷ 2. It adds a smoothing to an indicator that already has two: its line is calmer, and its lag greater. That page gives it neither a threshold nor a reading rule.
The limits of the DMI and the ADX
The ADX lags. It is a smoothed average of a ratio that is itself made of smoothed averages. It confirms a trend already in place, it does not announce it, and it stays high for a while after the trend has stopped: in the diagram, it is still at 33.7 seventeen candles after the rise ended.
The ADX does not give direction. It rises in a slump just as it does in a surge. Direction is read on +DI and −DI, or on the price chart.
With no trend, crossovers multiply. +DI and −DI cross again and again in a market that swings back and forth, and the ADX filter removes good crossovers too. StockCharts advises looking elsewhere for confirmation: volume-based indicators, analysis of the bigger trend, chart patterns.
It depends on the platform and on the history. Two indicators set to 14 can show 46.1 and 80.6 on the same candles, depending on their smoothing. And the first values of a short history are not reliable: StockCharts counts around 150 periods to absorb the smoothing.
Its thresholds come from other markets. Wilder traded commodities and currencies, StockCharts and TradingView point out. On a low-volatility stock, StockCharts writes, his parameters may generate no signal at all, and both the setting and the thresholds need adjusting to the instrument. The ADX belongs to the family of trend indicators, that of moving averages: the page on technical analysis explains why two tools from the same family do not make two confirmations. Momentum is another question, the one covered in the lesson on the stochastic oscillator.
Frequently asked questions
What is the DMI in trading?
The DMI, short for Directional Movement Index, is a three-line technical indicator. +DI and −DI compare the upward and downward pushes of the latest candles, and give the direction of the move. The ADX measures the strength of the trend, without saying its direction. J. Welles Wilder introduced it in 1978.
What does Directional Movement Index mean?
On TradingView and thinkorswim, the name refers to the whole set of +DI, −DI and ADX, abbreviated DMI. In the formulas given by StockCharts and MetaTrader 5, it refers to an intermediate value, the DX: 100 × |+DI − −DI| ÷ (+DI + −DI), of which the ADX is the smoothed average.
What is the difference between the DMI and the ADX?
The DMI is the whole system, the ADX is one of its three lines. +DI and −DI indicate direction; the ADX only indicates whether a trend is present and how strong it is. On TradingView, the ADX indicator plots that line alone, and the DMI indicator plots all three.
What is the best setting for the DMI and the ADX?
The original setting is 14 periods, and it is the default on TradingView, on StockCharts and for both MetaTrader 5 indicators. None of these sources names a best setting. Check the smoothing above all: MetaTrader 5's ADX and ADX Wilder are not calculated the same way with the same 14.
What does an ADX above 25 mean?
By convention, a strong trend. According to StockCharts and TradingView, Wilder spoke of a strong trend above 25 and of no trend below 20. That level does not say whether the trend is up or down, and the ADX crosses it late, because of its two smoothings.
Key takeaways
- The DMI combines three lines: +DI and −DI give the direction of the move, the ADX the strength of the trend. The ADX never says whether the market is rising or falling.
- Each candle has only one directional movement, +DM or −DM, or none. Smoothed and then divided by the true range, they give +DI and −DI; DX = 100 × |+DI − −DI| ÷ (+DI + −DI), and the ADX is the smoothed DX.
- The original setting is 14. Depending on the platform, the smoothing is Wilder's or an exponential average, and the values cannot be compared.
- 20 and 25 are conventions attributed to Wilder, designed with commodities in mind. +DI and −DI crossovers are numerous when the market has no trend.
- The ADX is smoothed twice: it confirms late and stays high after the move has ended. A falling ADX does not mean price is falling.
Going further
These blog articles dig into this lesson's ideas, one subject per article.