Formula
up = H - H[t-1]; down = L[t-1] - L
+DM = up if up > down and up > 0, else 0; -DM = down if down > up and down > 0, else 0
+DI = 100 * RMA(+DM, N) / RMA(TR, N); -DI = 100 * RMA(-DM, N) / RMA(TR, N)
DX = 100 * |+DI - -DI| / (+DI + -DI); ADX = RMA(DX, S)
RMA(x, N): first value = SMA of N values, then (prev * (N - 1) + x) / NHow TraderAI calculates it
TraderAI uses lengths 14 and 14 by default. On each candle only the larger of the upward and downward moves is counted, and only when it is positive. Directional movement and true range are smoothed with Wilder's method, seeded with a simple average, to produce +DI and -DI. DX is the gap between them divided by their sum, and ADX is the Wilder average of DX. +DI and -DI appear after 15 candles and ADX after 28.
Live example
How traders read it
+DI above -DI shows stronger upward movement; -DI above +DI shows stronger downward movement.
An ADX rising above roughly 20 to 25 is commonly read as a trending market; a low or falling ADX suggests a range.
ADX measures strength, not direction: a high ADX can come with a strong downtrend just as well as an uptrend.
Limitations
- Because it is smoothed twice, ADX reacts slowly and often peaks after a trend has already matured.
- +DI and -DI cross often in sideways markets.
Settings and defaults
| Setting | Default | Allowed range |
|---|---|---|
| DI length | 14 | 1 to 500 |
| ADX smoothing | 14 | 1 to 500 |
What it plots
Drawn in its own pane below the price chart, with its own scale.
| Line | Unit | Drawn as | First value |
|---|---|---|---|
| +DI | Percent | Line | after 15 candles |
| -DI | Percent | Line | after 15 candles |
| ADX | Index value | Line | after 28 candles |
Questions
What is Directional Movement Index (DMI/ADX)?
The Directional Movement Index (DMI) shows the direction and the strength of a trend with three lines. +DI measures upward movement, -DI measures downward movement, and ADX measures how strong the trend is regardless of its direction.
How does TraderAI calculate Directional Movement Index (DMI/ADX)?
TraderAI uses lengths 14 and 14 by default. On each candle only the larger of the upward and downward moves is counted, and only when it is positive. Directional movement and true range are smoothed with Wilder's method, seeded with a simple average, to produce +DI and -DI. DX is the gap between them divided by their sum, and ADX is the Wilder average of DX. +DI and -DI appear after 15 candles and ADX after 28.
What are the default settings of Directional Movement Index (DMI/ADX)?
The defaults are DI length: 14, ADX smoothing: 14. You can change every setting on the live chart.
Can I use Directional Movement Index (DMI/ADX) for free on TraderAI?
Yes. Every indicator in the library can be added to the free live chart. The free plan keeps up to 2 indicators active at the same time; Pro lets you combine more on one chart.
Educational content. Indicators describe past prices; they do not predict future prices and are not investment advice.