ADX (Average Directional Index) by itself can't tell you whether to buy or sell. A reading above 25 means a strong trend is in place, and a strong downtrend scores just as high on this line as a strong uptrend.
Direction comes from the two lines that travel with it: with +DI above −DI the trend is up, and with −DI above +DI it is down. The 25 and 20 levels go back to the indicator's designer, Welles Wilder. Below 20 the trend is weak or absent, and +DI/−DI crossovers produce the most false signals while ADX is under 25.
1. Trend direction comes from whether +DI or −DI is on top
Each of the three lines does one job. In StockCharts' ChartSchool article on the Average Directional Index (ADX), +DI and −DI measure trend direction, and the pair is often collectively referred to as the Directional Movement Indicator (DMI); ADX is derived from the smoothed averages of the difference between +DI and −DI and measures the strength of the trend, regardless of direction. Read together, the three lines show which way the trend is heading and how strong it is.
The three lines don't always come in one indicator. TradingView's ADX indicator does not display the +DI and −DI lines by itself; to see all three at the same time, its help page points to the Directional Movement Index (DMI) indicator. DMI on TradingView is therefore the name of an indicator with all three lines in it, while StockCharts uses DMI for the +DI and −DI pair only.
ADX can't separate a rise from a fall because of the step that comes before it, DX. In the formulas TradingView and StockCharts publish, DX is also spelled out as Directional Movement Index, the same name as TradingView's three-line DMI indicator; DX is a single number for each candle, not that three-line indicator. The formula:
DX = 100 × |+DI − −DI| ÷ (+DI + −DI)
The numerator is an absolute value. With +DI at 30 and −DI at 10, DX = 100 × 20 ÷ 40 = 50; with the two swapped, +DI 10 and −DI 30, DX is still 50. The bulls have the edge in the first case and the bears in the second, yet DX is identical, and because ADX is an average of DX it carries no direction either.
The same article has a chart of Nordstrom (JWN) with 14-day ADX: the stock moved from a strong uptrend to a strong downtrend in April-May, and ADX remained above 20.
2. The ADX formula: +DM, −DM and TR first, then 14-period smoothing
Every candle starts with three raw numbers. The first two are +DM and −DM, which TradingView's Help Center page for the Average Directional Index (ADX) gives as:
- +DM = Current High − Previous High
- −DM = Previous Low − Current Low
Only one of the two survives on each candle: the larger difference is kept and the other is entered as zero, and if the one that is kept turns out negative, it is entered as zero as well. A candle that sits entirely inside the previous candle's high-low range has two negative differences, so +DM and −DM are both zero.
The third number is TR (True Range). StockCharts notes that its calculation method is the same as for ATR, the Average True Range indicator. TR is the greatest of three distances: current high to current low, current high to previous close, and current low to previous close.
The example below runs on 3 periods, so five candles are enough to carry every step through to DX. Wilder's recommended setting is 14 periods, which works the same way with a much longer table. Candle 1 has no previous candle to compare against and only supplies the previous high, low and close for candle 2:
| Candle | High | Low | Close | High − previous high | Previous low − low | +DM | −DM | TR |
|---|---|---|---|---|---|---|---|---|
| 1 | 2,642 | 2,638 | 2,640 | — | — | — | — | — |
| 2 | 2,646 | 2,640 | 2,644 | 4 | −2 | 4 | 0 | 6 |
| 3 | 2,648 | 2,637 | 2,647 | 2 | 3 | 0 | 3 | 11 |
| 4 | 2,653 | 2,646 | 2,651 | 5 | −9 | 5 | 0 | 7 |
| 5 | 2,655 | 2,653 | 2,654 | 2 | −7 | 2 | 0 | 4 |
Candle 3 went beyond candle 2 at both ends, so both differences are positive; 3 is larger than 2, and −DM is the one that stays. Candle 5's low of 2,653 is above the previous close of 2,651. Its own high-low range is only 2, its high is 4 away from the previous close, and TR is 4.
All three raw numbers are then smoothed, which lets older data fade out by a fixed fraction each period. The first value is a plain sum of the first N periods. For every candle after that:
New value = Prior value − (Prior value ÷ N) + Current raw number
In the table N is 3. Adding up candles 2 to 4 gives +DM 9, −DM 3 and TR 24. Smoothed +DM divided by smoothed TR, times 100, is +DI, and −DI is worked out the same way:
- +DI = 100 × 9 ÷ 24 = 37.5, −DI = 100 × 3 ÷ 24 = 12.5
- DX = 100 × (37.5 − 12.5) ÷ (37.5 + 12.5) = 50
Candle 5 goes through the recursion: +DM = 9 − 9 ÷ 3 + 2 = 8, −DM = 3 − 3 ÷ 3 + 0 = 2, TR = 24 − 24 ÷ 3 + 4 = 20. That makes +DI 40, −DI 10 and DX = 100 × 30 ÷ 50 = 60.
ADX is DX smoothed one more time. Back at 14 periods, the first ADX is the average of the first 14 DX values, and for each period after that:
ADX = ((Prior ADX × 13) + Current DX) ÷ 14
Suppose the prior ADX is 40 and the current period has +DI at 30 and −DI at 20. DX = 100 × 10 ÷ 50 = 20, and the new ADX = (40 × 13 + 20) ÷ 14 ≈ 38.57. +DI is still above −DI while ADX is falling, which reads as an uptrend that is intact and losing strength.
Each layer of this recursion feeds the next, so the reading depends on where the calculation starts. StockCharts puts the requirement at around 150 periods of data to get true ADX values: values using only 30 periods of historical data will not match values using 150 periods, and with 150 or more they remain consistent. Anyone recalculating the line needs that many candles. Wilder uses similar smoothing techniques in his RSI and ATR calculations.
3. ADX readings above 25, below 20 and in between
TradingView's Help Center and StockCharts both put Wilder's name on the two levels:
| Source | ADX above 25 | ADX between 20 and 25 | ADX below 20 |
|---|---|---|---|
| TradingView Help Center | A trend shows the most strength | — | The trend is weak, or the price is considered trendless |
| StockCharts ChartSchool | A strong trend is present | There appears to be a gray zone | No trend is present |
TradingView labels a reading above 25 a "potential signal to buy", and the same page presents ADX as a tool for determining the strength of a trend, whether it be going up or down. A reading above 25 only establishes that the trend is strong; whether that trend is rising or falling is a question for +DI and −DI. At the other end, with ADX below 20, the page says it "might not be the most ideal time to enter a trade". A market that isn't following a specific trend doesn't mean the price isn't moving: it could be making a change, or the direction is not currently present. ADX should also be combined with other indicators that examine price, and with others that can help filter signals and control risk.
For StockCharts, the most basic use of ADX is to determine whether a security is trending or not, which helps traders choose between a trend-following system and a non-trend-following one. Many technical analysts use 20 as the key level, and one of its example charts uses 20 instead of 25 to qualify ADX signals, since a lower setting means more possible signals. ADX also has a fair amount of lag because of all the smoothing.
The recursion shows how slow that can be. Starting from a prior ADX of 15, with DX at 60 for four periods in a row, ADX reads 18.21, 21.20, 23.97 and 26.54, and it clears 25 only on the fourth.
4. Does a +DI/−DI crossover count as a signal when ADX is under 25?
Not under Wilder's own rules. As StockCharts describes his system, the first requirement is for ADX to be trading above 25, which ensures that prices are trending; once that holds, +DI crossing above −DI is a buy signal and −DI crossing above +DI is a sell signal. For a trailing stop once the trend develops, the article mentions another Wilder tool, the Parabolic SAR.
Crossovers with ADX under 25 are where TradingView's page places most "false signals". The lines can cross quite often, it says, and when they cross too frequently traders will most likely be confused and the potential for losing money can be high.
The DX formula explains why. Its numerator is the difference between +DI and −DI, so a low ADX means recent DX values have all been small and the two lines have stayed close together. Two lines that close together cross whenever price moves back and forth a little. Around each crossover the difference is near zero, DX is near zero as well, and that pulls ADX down further.
The StockCharts chart that uses 20 as its threshold shows Medco Health Solutions. It has plenty of +DI and −DI crosses. Some occur with ADX above 20 and validate the signal, others invalidate it, and the first group of whipsaws, in September 2009, occurred during a consolidation. Systems of this kind produce whipsaws, great signals and bad signals alike, and the key is to incorporate other aspects of technical analysis.
Using an ADX threshold as a filter has a cost as well. Setting an ADX requirement will reduce signals, but in StockCharts' assessment this heavily smoothed line tends to filter as many good signals as bad. Confirmation for telling strong crossover signals from weak ones has to come from elsewhere, and volume-based indicators, basic trend analysis and chart patterns can all help.
5. Wilder's original ADX setup: the 1978 book, 14 periods, daily commodity charts
Who invented the ADX indicator?
Welles Wilder. He featured the directional movement indicators in his 1978 book, New Concepts in Technical Trading Systems, which StockCharts notes also covers Average True Range (ATR), the Parabolic SAR system and RSI. In his hands +DI, −DI and ADX form one trading system, the Directional Movement System.
Can the ADX period of 14 be changed?
Yes. StockCharts states that the parameter can be adjusted to meet your technical analysis needs, and that adjusting the settings can increase sensitivity and signals. Fourteen is the period Wilder recommended; StockCharts' own worked example and its chart default both use 14. The period sets how much weight the newest value gets: at 14, the prior ADX counts for 13 parts in 14 and the new DX for 1.
Does ADX only work on daily charts?
No, and it isn't limited to commodities either. TradingView's page says Wilder initially designed it for daily commodity charts and that later modifications made it usable in other markets and on various timeframes. StockCharts cautions that low-volatility stocks may not generate signals on Wilder's parameters, in which case the indicator settings or the signal parameters will likely need adjusting to suit the security.
