What is ADX?
The Average Directional Index draws one line in its own pane that rises when price is moving decisively in one direction and falls when it is not. It is built from two directional lines, one for upward movement beyond the previous high and one for downward movement beyond the previous low. ADX is a smoothed measure of how far apart those two have been.
ADX measures trend strength, not direction. A rising ADX can belong to a rally or a sell-off, and the indicator does not say which. It does not predict when a trend will start or end.
How to use ADX
- Rising ADX. One direction is gaining control over the other. The trend, whichever way it runs, is strengthening.
- Falling ADX. The difference between upward and downward movement is shrinking. The trend is losing strength or price is moving into a range.
- Low readings. A low and flat ADX describes a market without a clear trend. Many traders use a level such as 20 or 25 as a dividing line, but none is drawn and nothing in the calculation fixes it.
- Direction from elsewhere. Check price or the +DI and -DI lines in Directional Movement to see which way the trend runs.
These are ways to read the line, not entry signals on their own.
Settings
| Setting | Default | What it changes |
|---|---|---|
| ADX Smoothing | 14 | Bars in the final Wilder average that produces ADX. Lower makes ADX react sooner and swing more; higher makes it smoother and later. Minimum 1. |
| DI Length | 14 | Bars in the Wilder averages behind the two directional lines and the average true range they are divided by. Minimum 1. |
Adjust both lengths in the indicator settings.
Calculation
Directional movement is measured against the previous bar, turned into two directional lines with Wilder's moving average, and the gap between them is smoothed again:
up = high - previous high
down = previous low - low
+DM = up if up > down and up > 0, else 0
-DM = down if down > up and down > 0, else 0
TR = max(high - low, |high - previous close|, |low - previous close|)
+DI = 100 * RMA(+DM, 14) / RMA(TR, 14)
-DI = 100 * RMA(-DM, 14) / RMA(TR, 14)
ADX = 100 * RMA(|+DI - -DI| / (+DI + -DI), 14)
RMA is Wilder's moving average, an exponential average with a smoothing factor of 1 / length. With a length of 14, each value moves one fourteenth of the way towards the new input, which is slower than a standard exponential average of the same length.
The first bar has no previous bar, so it has no directional movement and no true range. The directional lines start on the fifteenth bar of loaded history and ADX about 13 bars later, once it has 14 values to average. If a directional value cannot be calculated on a bar, the previous one is carried forward, and when both directional lines are zero the gap is taken as zero rather than dividing by zero.
Only the ADX line is plotted and no reference levels are drawn. The calculation is the same as the Directional Movement built-in, so the two ADX lines match.
Limitations
- It lags. Two rounds of Wilder smoothing mean ADX confirms a trend well after it has started and can keep rising after the move has slowed.
- It has no direction. A high ADX looks the same in a strong rally and a strong sell-off.
- Thresholds are convention. Levels such as 20 or 25 are widely quoted but are not part of the calculation, and what counts as trending differs between markets and timeframes.
- Early values depend on history. Wilder smoothing settles slowly, so values near the start of the loaded history differ from what longer history would show.
- The live candle moves. The current bar's high, low and close change until it closes, so the latest value moves too.
Frequently asked questions
The Average Directional Index is a line from 0 to 100 that measures how strongly price is trending. It compares upward movement beyond the previous high with downward movement beyond the previous low, and smooths the difference between them with Wilder's moving average. It says how strong the trend is, not which way it runs.
Read its direction and level. A rising ADX means the trend is strengthening; a falling ADX means it is weakening or price is ranging. Many traders treat readings below about 20 as no clear trend, but that is a convention to test, not a rule. Use price or the directional lines for direction.
Yes. The indicator declares two inputs: ADX Smoothing, default 14, and DI Length, default 14, each with a minimum of 1. DI Length sets the averages behind the directional lines; ADX Smoothing sets the final average. Open the indicator's settings on the chart to change them.
No. ADX is the same for a strong uptrend and a strong downtrend. To see direction, add Directional Movement, which draws +DI and -DI alongside the same ADX line, or read it from price.
No. Closed bars are not revised. The current bar's value moves while that bar is live and settles when it closes. Loading older history recalculates the Wilder averages from an earlier start, so values near the very start of the loaded range can shift.
Use the Add to chart button at the top of this page. It opens BTC/USDT on Binance in the Altrady Charts terminal with the built-in Average Directional Index already applied. On any other market, open the indicator picker on the chart and choose Average Directional Index from the Trend group.