Average Directional Index
Measures the *strength* of a trend on a 0–100 scale, regardless of direction. Classic thresholds: < 20 range, > 25 trend.
Example chart
BTC/USDT · 4h · last 90 days
Loading chart data…
What is ADX?
Average Directional Index — developed by J. Welles Wilder (1978) as part of his Directional Movement System. ADX answers a question that RSI and MACD cannot: how strongly is the market trending?
ADX itself has no direction. It is derived from two directional-movement indicators:
- +DI — strength of upward price moves
- −DI — strength of downward price moves
- ADX — smoothed, normalized distance between +DI and −DI
+DM = max(high_t − high_{t−1}, 0) if +DM > −DM else 0
−DM = max(low_{t−1} − low_t, 0) if −DM > +DM else 0
+DI = 100 · EMA(+DM) / EMA(TR)
−DI = 100 · EMA(−DM) / EMA(TR)
DX = 100 · |+DI − −DI| / (+DI + −DI)
ADX = EMA(DX)
(Smoothed with Wilder's EMA, α = 1/period.)
Classic thresholds
| ADX | Meaning |
|---|---|
| 0 – 20 | Sideways market / no trend |
| 20 – 25 | Grey zone — weak trend |
| 25 – 50 | Strong trend |
| 50 – 75 | Very strong trend |
| 75 + | Extreme trend, usually a reversal soon |
How Botty uses ADX
indicators/compute.py computes ADX(14) plus adx_slope (difference to the previous candle). Raschke Holy Grail: a long setup is only valid when ADX > 30 and adx_slope > 0 (trend is growing).
Used as: - Trend-quality filter — enable trading only when ADX > 20/25. - Strategy switcher — mean-reversion at low ADX, trend-following at high ADX.
Important properties
- Lagging. ADX confirms trends, it does not forecast them.
- Indirect. Says nothing about trend direction — for that look at +DI vs −DI or the price itself.
- Falling ADX ≠ trend reversal. Only: the trend is losing strength. It can still continue.