๐น ADX โ Average Directional Index
ADX answers a question none of the moving averages can: "is there even a trend worth following?" It measures the strength of a directional move, deliberately ignoring its direction.
๐ก Financial Meaning
Traders often pair ADX with a trend-following system (moving-average crossovers, breakouts) as a filter: only take trend signals when ADX is rising above a threshold (commonly 25), and stand aside when it is low โ a sign of a range-bound, chop-prone market where trend-followers get whipsawed. The two companion lines, +DI and -DI, show which direction currently dominates.
๐ข Mathematical Formulas
-
Directional Movement โ the larger of the up-move or down-move in high/low, keeping only the dominant one:
\[ +DM_t = \max(H_t - H_{t-1},\, 0) \quad \text{if} \quad H_t - H_{t-1} > L_{t-1} - L_t, \text{ else } 0 \]\[ -DM_t = \max(L_{t-1} - L_t,\, 0) \quad \text{if} \quad L_{t-1} - L_t > H_t - H_{t-1}, \text{ else } 0 \] -
True Range \(TR_t\) (see ATR), smoothed over \(N\) sessions, normalises the directional moves into +DI / -DI:
\[ +DI_t = 100 \cdot \frac{SMMA_N(+DM)}{SMMA_N(TR)}, \qquad -DI_t = 100 \cdot \frac{SMMA_N(-DM)}{SMMA_N(TR)} \] -
Directional Index and its own smoothing give the ADX:
\[ DX_t = 100 \cdot \frac{\left| +DI_t - -DI_t \right|}{+DI_t + -DI_t}, \qquad ADX_t = SMMA_N(DX) \]
โ๏ธ Parameters
| Parameter | Key | Default | Description |
|---|---|---|---|
| Period (\(N\)) | period |
14 | Smoothing window for +DM, -DM, TR and DX, in sessions. |
๐๏ธ Signal Processing Equivalent โ Rectified, Normalised Derivative Envelope
+DM and -DM are half-wave rectified derivatives of the high/low series โ conceptually the same trick RSI applies to the close. The DI lines normalise each rectified derivative by the True Range (the signal's local amplitude), making them scale-invariant. ADX then takes the normalised absolute difference of two envelopes and smooths it โ effectively measuring how far the "directional energy" is from being evenly split between up and down.
flowchart LR
HL["๐ High / Low"] --> DM["โโ +DM / -DM"]
HLC["๐ High / Low / Close"] --> TR["๐ก๏ธ True Range"]
DM --> SMMA1["๐ SMMA(N)"]
TR --> SMMA2["๐ SMMA(N)"]
SMMA1 --> DI["๐ +DI / -DI"]
SMMA2 --> DI
DI --> DX["๐ DX = |+DIโ-DI| / (+DI+-DI)"]
DX --> ADX["๐น ADX = SMMA(N, DX)"]
ADX is not directional
A rising ADX with +DI above -DI confirms an uptrend; a rising ADX with
-DI above +DI confirms a downtrend. ADX alone, without checking which DI
line is on top, only tells you a trend exists โ never which way it points.