ADX / DMI¶
Indicators · Trend
Average Directional Index + Directional Movement lines.
ADX / DMI answers the one question every other indicator ignores: is there even a trend here? It doesn't tell you up or down on its own — it measures trend strength. That makes it the perfect referee. Most strategies fail because they run trend logic in a range or mean-reversion logic in a trend; ADX lets you switch the right tool on at the right time.
How it works¶
Wilder's system has two layers. The +DI and −DI lines track directional movement — how much of recent range came from higher highs (+DI) versus lower lows (−DI). When +DI is above −DI the trend leans up; when −DI leads, down. The ADX line then measures how strongly they're separated, smoothed over the Period (default 14), on a 0–100 scale — high ADX means a strong trend regardless of direction, low ADX means chop.
A dashed Trend threshold guide (default 25) marks the line between "trending" and "ranging," and the block exposes a plain Trend? signal that fires true whenever ADX sits above it — ready to gate the rest of your graph.
When to use it¶
Use ADX as a regime filter, almost never as a standalone entry. Above ~25, trend-following logic (moving-average crosses, breakouts, Supertrend) has the wind at its back; below ~20, favour mean-reversion (RSI/Stochastic fades) and switch breakouts off. The +DI/−DI cross can act as a direction cue, but it's noisy alone — its real value is confirming that a move has strength behind it.
Example¶
Gate a crossover system with regime. Wire bars into both an EMA crossover and ADX, then put the crossover trigger and the Trend? signal through an And gate into a Buy Signal — so the system only takes trend entries when ADX confirms a real trend, and stays flat in the chop that kills crossover strategies. Backtest both with and without the gate in the Tester to see the false signals it removes.
Tips & gotchas¶
- ADX is directionless. A high reading means strong, not up. Read direction from +DI vs −DI (or from price), then use ADX for strength.
- Rising vs falling matters more than the level. ADX turning up from below 20 often marks the birth of a trend — frequently a better tell than the absolute 25 line.
- It lags — twice. Wilder smoothing on top of directional movement makes ADX slow to react; it confirms trends, it doesn't predict them.
- Tune the threshold per market. 25 is convention; slow FX majors may justify lowering it, fast indices raising it.
- Best as a switch, not a signal. Its highest-value job is turning other logic on and off, not generating entries itself.
Related blocks¶
Inputs¶
| Socket | Type | What to wire in |
|---|---|---|
| Bars | bars |
Price bars |
Outputs¶
| Output | Type | Plots as | Description |
|---|---|---|---|
| ADX | series |
Line · sub-pane | ADX value (0..100) |
| +DI | series |
Line · sub-pane | +DI line |
| −DI | series |
Line · sub-pane | −DI line |
| Trend? | signal |
— | True when ADX is above the trend threshold |
Parameters¶
| Parameter | Type | Default | What it does |
|---|---|---|---|
| Period | number · 2–100 | 14 |
|
| Trend threshold | number · 0.0–100.0 | 25.0 |
|
| ADX color | colour | #fdd835 |
|
| +DI color | colour | #66bb6a |
|
| −DI color | colour | #ef5350 |
Chart guides
This indicator draws reference level(s): trend_threshold.
Reference auto-generated from the block catalog · category Indicators.