What it measures
Each bar is compared with the one before. If its high went further above the previous high than its low went below the previous low, the bar has upward directional movement of that amount. In the mirror case it has downward movement. A bar that stayed inside the previous bar has neither.
Those movements are averaged and set against the average true range, which gives two lines: +DI, the share of recent range that was upward movement, and −DI, the share that was downward. When one is much larger than the other, movement has been one-sided.
ADX is an average of how far apart the two lines are, as a proportion of their sum. A long rise and a long fall of the same steadiness give the same ADX. It was set out by J. Welles Wilder Jr. in 1978, in the same book as RSI and ATR, and uses the same smoothing.
How it is calculated, step by step
- 01
Find each bar’s directional movement.
Up-move = high − previous high. Down-move = previous low − low. If the up-move is the larger and above zero, +DM = up-move; otherwise +DM = 0. If the down-move is the larger and above zero, −DM = down-move; otherwise −DM = 0.
- 02
Find each bar’s true range.
TR = max(high − low, |high − previous close|, |low − previous close|), as for ATR.
- 03
Smooth all three (Wilder’s smoothing).
Each starts as the plain average of its first N values, then: average = (previous average × (N − 1) + this bar’s value) ÷ N. N is usually 14.
- 04
Turn the movements into the two DI lines.
+DI = 100 × smoothed +DM ÷ smoothed TR. −DI = 100 × smoothed −DM ÷ smoothed TR.
- 05
Measure how far apart they are.
DX = 100 × |+DI − −DI| ÷ (+DI + −DI). If both are zero, this page shows 0.
- 06
Average that.
ADX starts as the plain average of the first N values of DX, then ADX = (previous ADX × (N − 1) + DX) ÷ N.
ADX is a smoothing of a ratio of smoothings, so it needs about twice its length in bars before its first value and it is late by construction. Wilder’s own worksheets kept running totals instead of averages; the ratios, and so the lines, are the same. Programs with different amounts of history loaded can differ slightly, as with RSI.
A worked example, by hand
Five bars, written high / low / close: 10 / 8 / 9, then 12 / 9 / 11, then 13 / 11 / 12, then 12 / 9 / 10, then 11 / 8 / 9. Length 2.
- Bar 2: up-move 12 − 10 = 2, down-move 8 − 9 = −1, so +DM = 2 and −DM = 0; TR = 3
- Bar 3: up-move 1, down-move −2, so +DM = 1 and −DM = 0; TR = 2
- At bar 3: smoothed +DM = (2 + 1) ÷ 2 = 1.5; smoothed −DM = 0; smoothed TR = (3 + 2) ÷ 2 = 2.5. +DI = 100 × 1.5 ÷ 2.5 = 60; −DI = 0; DX = 100 × 60 ÷ 60 = 100
- Bar 4: up-move −1, down-move 11 − 9 = 2, so +DM = 0 and −DM = 2; TR = 3. Smoothed +DM = (1.5 + 0) ÷ 2 = 0.75; smoothed −DM = (0 + 2) ÷ 2 = 1; smoothed TR = (2.5 + 3) ÷ 2 = 2.75
- At bar 4: +DI = 100 × 0.75 ÷ 2.75 = 27.27; −DI = 100 × 1 ÷ 2.75 = 36.36; DX = 100 × 9.09 ÷ 63.64 = 14.29. First ADX = (100 + 14.29) ÷ 2 = 57.14
- Bar 5: −DM = 1, TR = 3. +DI = 100 × 0.375 ÷ 2.875 = 13.04; −DI = 100 × 1 ÷ 2.875 = 34.78; DX = 100 × 21.74 ÷ 47.83 = 45.45. ADX = (57.14 + 45.45) ÷ 2 = 51.30
The price rose for two bars and fell for two. −DI has passed +DI, which records the change of direction, while ADX is still high because it averages one-sidedness and both stretches were one-sided.
The numbers in this example were chosen to be easy to add up. They are not prices of anything.
How people read it
- The level of ADX. By convention a reading above about 25 is described as a trending market and one below about 20 as a market without much direction. The figures are conventions, not thresholds with a known effect.
- Rising or falling. A rising ADX means movement has been getting more one-sided; a falling one means the two directions have been drawing level.
- +DI against −DI. Whichever is higher shows which direction has had the larger movement. Their crossings are watched as changes of direction.
- Together. Readers use ADX to decide how much weight to give to the DI lines: a crossing while ADX is low is treated as noise more readily than one while it is high.
What it cannot tell you
- It cannot tell you direction. A steady fall gives as high an ADX as a steady rise.
- It cannot say that a trend will continue. A high reading says that recent movement was one-sided, and it stays high for some time after that has stopped being true.
- It cannot be early. It is built from three layers of averaging, and at the usual length of 14 its first value needs 28 bars.
- It cannot tell a quiet market from a violent one. Movement is divided by the true range, so a small, steady drift and a large, steady run can read the same.
Common mistakes
- Reading a rising ADX as a rising price. It rises in a falling market too.
- Reading a falling ADX as a reversal. It falls when a trend pauses, and when a market that was falling starts to rise.
- Treating 25 as a switch between two kinds of market. The line is a convention, and a market does not change character as the reading passes it.
- Trading every crossing of +DI and −DI. In a sideways market they cross repeatedly.
Questions people ask
- What does an ADX above 25 mean?
- That over the bars ADX remembers, movement in one direction has been clearly larger than movement in the other. By convention that is called a trending market. It does not say which way the trend runs, and it does not say that the trend will last: the reading describes bars that have already closed.
- What is the difference between ADX and the DI lines?
- +DI and −DI measure upward and downward movement separately, each as a share of the average true range. ADX measures how far apart those two lines have been, whichever is on top. The DI lines carry the direction; ADX carries only how one-sided the movement was.
- Can ADX be used alone?
- It answers one question, how one-sided recent movement has been, and nothing else. It is usually read beside the DI lines or the price itself, because by construction it cannot say which way a market has moved.
The words on this page
An indicator is arithmetic on prices that have already happened. It describes what a price did; it does not predict what a price will do. The chart on this page is invented: a seeded random walk, not a market. This page is an explanation for study. It is not advice, a recommendation or a forecast, and nothing an indicator shows says anything certain about what a price will do next.
