On this page
ADX/DMI — Momentum, in its own panel below the chart.
What ADX/DMI measures
Each bar produces an up move (high minus previous high) and a down move (previous low minus low); only the larger of the two counts, and only when it is positive, so a bar feeds +DM or −DM but never both. Wilder's running sum accumulates +DM, −DM and true range over the period, and each directional sum is then divided by the true-range sum, giving +DI and −DI as percentages. DX is the absolute gap between the two DIs relative to their total, with Wilder's convention that a zero total yields a DX of zero. ADX starts from the simple average of the first N values of DX and is carried forward with Wilder's smoothing, which leaves it a strength measure with no direction in it. When the smoothed true range over the window is zero, the DIs are undefined and that bar's DX is not fed into the ADX, so the average is never advanced with a fabricated value.
The formula, as implemented
This is not how the indicator is usually defined elsewhere — it is what the shipped code computes, documented next to the implementation:
ADX / DMI (Wilder, 1978) — lissage WILDER par sommes (S = S − S/N + x) : up = high − highₚ ; dn = lowₚ − low +DM = up si up > dn et up > 0, sinon 0 ; −DM = dn si dn > up et dn > 0 +DI = 100·S(+DM)/S(TR) ; −DI = 100·S(−DM)/S(TR) DX = 100·|+DI − −DI|/(+DI + −DI) (somme nulle → DX = 0, conv. Wilder) ADX = moyenne des N premiers DX, puis (ADX·(N−1) + DX)/N S(TR) = 0 (barres sans range) → DI null et le DX n'alimente PAS l'ADX (on n'accumule pas une valeur inventée). Défaut N=14 (Wilder). Sorties : [+DI, −DI, ADX].
How to read it
- +DI above −DI says recent range was built more by new highs than new lows; below, the opposite. The crossing marks where the balance changed, not where a trade is due.
- ADX rising means the gap between the two DIs is widening — pressure is becoming one-sided. ADX falling means they are converging, whatever price is doing.
- ADX is direction-blind by construction: a strong downtrend and a strong uptrend produce the same high reading.
- A low, flat ADX with DIs crossing back and forth describes a range, and crossovers in that state carry little information.
- ADX turning down from a high level says the move is losing its one-sidedness, which can precede either a pause or a reversal.
Parameters and defaults
period (14, Wilder's own) drives both the DI smoothing and the ADX smoothing; there is no separate ADX length. A shorter period makes the DIs cross more often and the ADX swing faster, a longer one produces fewer and later crossings. The three colors are display only and do not touch the calculation.
| Parameter | Type | Default | Range |
|---|---|---|---|
| Period | number | 14 | 1 – 200 |
What it does not show
The system reads high, low and close and nothing else. It has no access to traded volume, to the aggressor side of each trade or to resting liquidity, so it cannot separate a trend pushed by aggressive buyers from one drifting on an empty book. Wilder's smoothing carries a long memory, which makes ADX late by design and keeps it elevated for several bars after a trend has stopped. Where the smoothed true range collapses to zero — filler bars in a frozen or illiquid market — the DIs are undefined rather than zero, leaving gaps in the lines that are correct but can surprise.
Related indicators
This page in other languages
Frequently asked questions
- What is the difference between ADX and DMI?
- DMI is the pair of directional lines, +DI and −DI, which say which side of the range dominated. ADX is derived from them: it normalises the gap between the two and smooths it into a single line describing how one-sided the market has been. DMI carries the direction, ADX carries only the strength of the imbalance.
- What ADX level counts as a trending market?
- Readings above 25 are widely treated in practice as trending and below 20 as rangebound, but these are habits of usage, not thresholds the formula produces. ADX is a doubly smoothed ratio, so its usual range depends on the instrument, the bar type and the period used. The direction of the ADX line often carries more information than the exact level.
- Why does ADX stay high after a move has ended?
- ADX is smoothed twice with Wilder's method, and each value keeps a weighted memory of the previous one. After a directional move stops, older DX values continue to dominate the average for several bars. This is inherent to the formula; shortening the period reduces the delay at the cost of a noisier line.