+DI cross with strong ADX
A textbook DMI long, gated by ADX above 25 to skip non-trending markets.
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.
Entry ideas
A textbook DMI long, gated by ADX above 25 to skip non-trending markets.
An early-regime long that fires when ADX crosses up through the trend threshold from a sleepy range.
A continuation long that buys pullbacks inside a confirmed strong-trend regime.
Exit ideas
A symmetrical DMI exit that mirrors the +DI cross-up entry.
An early exit that fires when ADX peaks and starts falling, even before the directional cross.
A regime-exit rule that closes the position when the trend regime itself ends.
Utilities
A bias filter that gates any directional entry on whether ADX confirms a trend is present.
The inverse use of ADX: gate mean-reversion entries to range regimes only.
A volatility-aware sizing rule that scales position size with the strength of the trend.
| 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. |
//@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.
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.
ADX has three classic failure modes.
The first is lag. ADX is the smoothed gap between two smoothed indicators, so by the time it confirms a trend, the trend is already underway. ADX is a terrible early-entry signal in isolation — it confirms regimes, it does not predict them. Always pair it with a faster timing trigger.
The second is high values. ADX above 40 looks like the strongest possible trend signal, but mature trends are usually near exhaustion. New entries when ADX is already extended tend to catch the last leg before reversal. Use rising ADX off a low base, not high absolute ADX, as the bullish trend-strength read.
The third is threshold rigidity. The 20/25 thresholds work across most liquid markets and timeframes but not all. Some highly trending instruments (commodities in a regime, crypto in a parabolic) live above 30 for weeks; others (most FX pairs) rarely break above 25 even during real trends. Tune thresholds to the specific instrument, or use percentile-based thresholds rather than absolute values.
| Indicator | When to prefer |
|---|---|
| Supertrend | Supertrend gives a single binary regime flip with built-in volatility-adjusted stops; ADX gives a continuous strength reading you can use as a filter. Supertrend for mechanical entry/exit; ADX for gating other systems. |
| MACD | MACD measures trend-momentum and gives directional timing signals (signal-line cross, zero-line position). ADX measures only trend strength and adds direction via +DI/−DI. They complement each other — ADX confirms a trend exists, MACD times the entry. |
| ATR | ATR measures volatility regardless of direction or trend; ADX measures whether that movement is directional. A high-ATR / low-ADX market is choppy and volatile (worst for trend-following); high-ATR / high-ADX is a clean strong trend. |
No — ADX measures the strength of a trend, not its direction. A rising ADX could be a strong uptrend or a strong downtrend; the value alone does not say which. Direction comes from +DI and −DI: +DI above −DI means bullish bias, +DI below −DI means bearish. Reading ADX without the DI lines is a classic misuse.
Wilder's thresholds — 20 for "trend present" and 25 for "strong trend" — work on most liquid markets and timeframes. Above 40 indicates a very strong trend that is often near exhaustion. These are guidelines, not absolutes: some instruments run hot (commodities, crypto in parabolics) and others run cool (many FX pairs rarely break 25). Tune thresholds to the instrument when possible.
They answer different questions. MACD reads trend-momentum and gives directional timing signals — use it to time entries within a regime. ADX reads trend strength and tells you whether any directional signal is worth taking. Most strong systems combine both: ADX as a regime filter (only trade when ADX > 20), MACD or another directional indicator for the actual entry trigger.
ADX is double-smoothed. +DI and −DI are each Wilder-smoothed over 14 bars, and the gap between them (DX) is smoothed again over 14 more bars to produce ADX. By the time ADX confirms a trend, the trend has usually been underway for 10–20 bars. That lag is the cost of stability — ADX rarely gives false trend confirmations, but it also rarely catches the start of a move. Use it as a regime filter, not an early-entry signal.
Continue exploring
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 MACDMomentumRelative Strength Index
A momentum oscillator that measures the speed and magnitude of recent price changes on a bounded 0–100 scale.
View RSIVolatilityBollinger Bands
A volatility envelope built from a moving average and ±2 standard deviations, expanding and contracting as volatility changes.
View BBAbout these ideas
Each entry, exit, and utility rule in the Playbook is hand-picked from established trading literature, validated against historical backtests, and reviewed by the PineWiz team. We add new ideas as we encounter them and refresh existing ones when market behavior or default settings shift. Last review: .
Educational content. Not financial advice.