ADX
Average Directional Index
A non-directional trend-strength reading, paired with +DI / −DI for direction — the canonical regime filter for any directional system.
ADX is a non-directional trend-strength indicator developed by J. Welles Wilder. It reads 0–100, where below 20 is a weak or no-trend regime, 20–25 is emerging, 25–40 is trending, and above 40 is strongly trending. Pair with +DI and −DI for direction. Most commonly used as a regime filter to gate other directional signals. Default settings: DI length 14, ADX smoothing 14.
ADX, developed by J. Welles Wilder, measures the strength of a trend without saying anything about its direction. It is built from two directional indicators: +DI (smoothed positive directional movement, i.e. how much higher the highs are pushing) and −DI (smoothed negative directional movement). The gap between them, smoothed again, produces an ADX value bounded 0–100. Below 20 means weak or no trend, 20–25 means emerging, 25–40 means trending, above 40 means strongly trending (and often near exhaustion).
The three reading lenses are: the ADX value itself (trend strength), the +DI / −DI cross (directional bias and timing), and the ADX slope (rising = trend accelerating; falling = trend decaying, even if value is still high). ADX is almost never traded standalone — its job is to gate other signals. Pair it with a directional indicator (EMA, MACD, Supertrend) so trend-following entries only fire when ADX confirms a trend is actually present.
How do I read ADX?
- ADX below 20 = weak trend or range regime. Directional strategies (trend-following) struggle; mean-reversion strategies (RSI, Bollinger) tend to work.
- ADX between 20 and 25 = emerging trend. A cross up through 20 is the earliest reliable signal that a trend regime is starting.
- ADX between 25 and 40 = trending regime. Directional strategies have their highest hit rate here. Most trend-following systems concentrate position size in this band.
- ADX above 40 = strongly trending and often near exhaustion. Counter-trend entries are still dangerous, but reward/risk on new trend-direction entries gets worse — the easy part of the move is usually over.
- Rising ADX = trend is accelerating; positions in the +DI/−DI-aligned direction are winning. Falling ADX = trend is decaying; tighten stops or exit even before the DI cross fires.
- +DI above −DI = directional bias is up. +DI below −DI = directional bias is down. The DI cross is the timing trigger; ADX is the strength filter.
How is ADX calculated?
ADX is built from two directional movement indicators (+DI and −DI), which are themselves smoothed measures of how much highs are pushing up versus how much lows are pushing down. The ADX line is a smoothed measure of the gap between +DI and −DI, expressed on a 0–100 scale.
- 1.For each bar, compute +DM = max(high − previous high, 0) and −DM = max(previous low − low, 0). Whichever directional movement is larger keeps its value; the smaller is set to zero (only one direction "wins" each bar).
- 2.Smooth +DM and −DM with Wilder smoothing (RMA in Pine) over the DI length (default 14) and divide by smoothed True Range to get +DI and −DI, each on a 0–100 scale.
- 3.Compute DX = |+DI − −DI| / (+DI + −DI) × 100. This measures the directional gap as a percentage — high when one direction dominates, low when they balance.
- 4.Smooth DX with Wilder smoothing over the ADX smoothing length (default 14) to get the final ADX line.
- 5.ADX is non-directional: it only tells you whether a trend is present and how strong it is, not which way it points. +DI vs −DI supplies the direction.
What are the default ADX settings?
| Parameter | Default | When to adjust |
|---|---|---|
| DI Length | 14 | Wilder's original. Lookback for the +DI / −DI smoothing. Shorter (7) gives faster DI crosses on intraday/crypto; longer (21) is smoother on weekly charts. |
| ADX Smoothing | 14 | Wilder's original. Smoothing applied to DX to produce the ADX line itself. Usually matches DI length. Shortening it makes ADX more reactive to fresh trends but choppier; lengthening it makes the regime read more stable but more lagging. |
How do I plot ADX in Pine Script?
//@version=5
indicator("ADX Example", overlay=false)
diLen = input.int(14, title="DI Length", minval=1)
adxSmoothing = input.int(14, title="ADX Smoothing", minval=1)
[diPlus, diMinus, adxLine] = ta.dmi(diLen, adxSmoothing)
plot(adxLine, title="ADX", color=color.orange, linewidth=2)
plot(diPlus, title="+DI", color=color.green)
plot(diMinus, title="-DI", color=color.red)
hline(20, "Trend threshold", color=color.gray, linestyle=hline.style_dashed)
hline(25, "Strong trend", color=color.gray, linestyle=hline.style_dashed)Pine's ta.dmi() returns three values in one call — +DI, −DI, and ADX — using Wilder's smoothing internally. Plot ADX in a bold color over the two DI lines so the regime read dominates the eye; horizontal lines at 20 and 25 anchor the threshold bands. Pair the DI length and ADX smoothing inputs to make tuning explicit. Everything you need for a regime filter or DI-cross entry is in those three plotted values.
Continue exploring
Related indicators
MACD
Moving Average Convergence Divergence
A trend-momentum indicator built from the difference between two EMAs, plus a signal line and histogram that visualise momentum shifts.
View MACDMomentumRSI
Relative Strength Index
A momentum oscillator that measures the speed and magnitude of recent price changes on a bounded 0–100 scale.
View RSIVolatilityBB
Bollinger Bands
A volatility envelope built from a moving average and ±2 standard deviations, expanding and contracting as volatility changes.
View BBAbout this reference
This page is an educational reference explaining what ADX is, how it is calculated, its default settings, and how to plot it in Pine Script. It is compiled from established trading literature and public technical documentation. Last review: .
Educational content. Not financial advice.