ADX / DMI

Three indicators in one — +DI and −DI measure trend direction; ADX measures trend strength. Together they answer 'is there a trend, and which way?'

Updated 2026-05-24
10 min read
intermediate

Three indicators in one bundle. +DI and −DI measure upward and downward directional movement separately. ADX measures the strength of whichever direction is dominant — regardless of which way the market is going. Developed by Welles Wilder in 1978.

Placeholder · Video / Clip

ADX/DMI(14) on MES daily — trend strength rising and fading

Author hint: MES daily, dark theme, ~120-bar window. ADX/DMI(14) plotted in a sub-panel: +DI in green, -DI in red, ADX in white/yellow, with a horizontal reference line at 25. Show a stretch where ADX rises above 25 during a trend, then drops below during chop. ≤ 10 seconds, no audio. Save to /public/images/guide/indicators/adx-dmi/chart.mp4.

What it measures

  • Trend strength (ADX). A single number from 0 to ~100 representing how strong the current trend is, regardless of direction. ADX above 25 = trending; below 20 = ranging.
  • Trend direction (+DI vs −DI). Two separate lines: when +DI is above −DI, the trend is up; when −DI is above +DI, the trend is down.
  • Direction-strength independence. ADX rises in both strong uptrends and strong downtrends. The +DI/−DI pair tells you which.

Formula

How AlgoLift computes it

Step 1 — Directional Movement (DM):

+DM = max(High[t] − High[t-1], 0)   if High[t] − High[t-1] > Low[t-1] − Low[t]
                                     else 0
−DM = max(Low[t-1] − Low[t], 0)     if Low[t-1] − Low[t] > High[t] − High[t-1]
                                     else 0

Step 2 — Smoothed values over the period (Wilder smoothing by default):

+DI = 100 × Smoothed+DM / ATR
−DI = 100 × Smoothed−DM / ATR

Step 3 — ADX:

DX = 100 × |+DI − −DI| / (+DI + −DI)
ADX = Wilder-smoothed average of DX over the period

The clever part: DX measures the spread between +DI and −DI. When the trend is strong in either direction, that spread is large; when there's no trend, +DI and −DI are similar and DX is small. ADX is just the smoothed version of DX.

The default smoothing method is Wilder's smoothing. AlgoLift also exposes EMA, RMA, SMA, and WMA as alternatives.

Inputs in AlgoLift

SettingDefaultRangeNotes
Period142–500Lookback for DMI and ADX calculations.
Smoothing MethodWilderWilder / EMA / RMA / SMA / WMAHow TR, +DM, and −DM are smoothed. Wilder is the original.
ADXR Lookback0 (disabled)0–500When > 0, computes the ADX Rating — average of ADX with ADX lookback bars ago.

Recommended settings

  • (14, Wilder) — default. Standard for daily and intraday alike.
  • (7, Wilder): Faster — for short-timeframe trading.
  • (20, EMA): Smoother — for slow swing strategies.

Outputs in AlgoLift

HandleTypePlottedNotes
+DINumericAlwaysPositive directional indicator (0–100).
−DINumericAlwaysNegative directional indicator (0–100).
ADXNumericAlwaysTrend strength (0–100).
DXNumericOn selectUnsmoothed ADX — raw bar-by-bar trend strength.
ADXRNumericOn selectADX Rating — average of ADX now and ADX adxr_lookback bars ago.
DI DifferenceNumericOn select+DI − −DI. Positive = bullish, negative = bearish.
DI RatioNumericOn select+DI / −DI. > 1 = bullish, < 1 = bearish.
Placeholder · Screenshot

ADX/DMI node — default state with all seven outputs

Author hint: The ADX/DMI node on a fresh canvas with default settings (Period=14, Wilder, ADXR Lookback=0). All seven output handles labeled. Dark theme. Tight crop. Save to /public/images/guide/indicators/adx-dmi/node.png.

Reading the components together

The standard interpretation framework:

  • ADX < 20: No trend. Range-bound conditions. Mean-reversion strategies favored.
  • ADX 20–25: Transitional. Trend may be forming or fading.
  • ADX > 25: Trending. Trend-following strategies favored.
  • ADX > 40: Strong trend. Trend-following strategies likely to perform exceptionally; mean-reversion strategies likely to lose.
  • ADX falling from > 40: Trend is exhausting. Often precedes consolidation or reversal.
  • +DI > −DI: Direction is up (when ADX confirms a trend exists).
  • −DI > +DI: Direction is down.
  • +DI/−DI crossover: Direction shift signal (most useful when ADX is above 20).

ADX alone tells you nothing about direction. +DI vs −DI alone tells you nothing about whether the direction is meaningful. The combination is what makes the indicator useful.

Key Takeaway

ADX is unique among indicators — it's a regime classifier (trending vs. ranging) and a trend-strength gauge in one number, with the direction information available separately. Use ADX as the meta-filter that decides which strategy type to run, then use +DI/−DI for the actual direction.

Best in / worst in

Best in instruments with clear regime transitions (most major futures and equity indices), and as a portfolio-level filter that decides whether trend or mean-reversion strategies should be active.

Worst in extremely fast-moving markets where ADX can spike to 50+ on a single news event without representing a sustained trend, and in very-low-timeframe analysis where the 14-period default produces too much lag.

Three setups

1. ADX as a strategy gate

The classic use — turn other strategies on/off based on ADX regime.

  • Trend strategy active when: ADX > 25.
  • Mean-reversion strategy active when: ADX < 20.
  • Both paused when: ADX between 20 and 25 (transition zone).

A single ADX check can radically improve a portfolio's stability.

Placeholder · Screenshot

ADX as a regime gate switching between trend and mean-reversion strategies

Author hint: Node graph showing ADX output feeding two parallel comparisons (> 25 and < 20) gating two different strategy sub-graphs via Conditional Flow. Save to /public/images/guide/indicators/adx-dmi/setup-01.png.

2. DI crossover with ADX confirmation

Direction signal with strength confirmation.

  • Long: +DI crosses above −DI AND ADX > 20 (trend exists) AND ADX slope > 0 (trend strengthening).
  • Short: −DI crosses above +DI AND ADX > 20 AND ADX slope > 0.

The ADX-slope-positive requirement is what separates this from noise — a DI crossover during weakening ADX is much lower quality.

3. ADX-strength position sizing

Scale position size to trend strength.

  • Position size = base_size × (ADX − 20) / 30, clamped between 0 and 1.5× base.
  • When ADX = 20 (boundary), size = 0 (no trade).
  • When ADX = 50 (strong trend), size = 1.0 (full base).
  • When ADX = 65 (very strong), size = 1.5 (oversized).

Combined with fixed-fractional risk math, this puts more capital behind trades when the trend backdrop justifies it. See position sizing.

Advanced patterns in AlgoLift

ADX-driven Conditional Flow for regime switching. Wire the ADX output into a Conditional Flow node that routes the strategy between two distinct entry sub-graphs — a trend-following logic when ADX > 25, a mean-reversion logic when ADX < 20. The single graph adapts to current market state. See market regimes for the broader pattern.

ADX as a scaled entry accelerator. Take the initial position on a DI crossover. Use Scaled Entry to add when ADX crosses 30, then again at 40 — the strategy scales up as the trend confirms itself. Effective in instruments that produce extended directional runs.

ADXR as a trend-exhaustion exit. ADXR (ADX Rating) is the average of current ADX and ADX from N bars ago. When current ADX has fallen below ADXR, the trend is exhausting. Enable ADXR Lookback (set to 14) and use this comparison as an exit trigger via Set Exit Condition.

Multi-timeframe ADX agreement. Add a 1h data series alongside your 5m execution. Only allow trades when both timeframes' ADX > 25 AND both DI pairs agree on direction. The dual-timeframe filter eliminates trades against the higher-timeframe context.

Common mistakes

  • Reading ADX as a direction indicator. ADX is direction-agnostic. ADX rising means the trend is strengthening, but ADX itself doesn't say which way.
  • Treating ADX > 25 as universal "good time to trade." ADX > 25 is good for trend strategies. For mean-reversion strategies, it's bad — strong trends are exactly when mean-reversion fails.
  • Using +DI/−DI crossovers without ADX context. A DI crossover when ADX < 20 happens in chop — half the crossovers in a typical year are noise.
  • Optimizing the period below 7. ADX needs enough data to identify trend persistence. Below 7-period, the indicator essentially becomes raw price noise.
Common Misconception
Myth
High ADX means it's a good time to enter a trade.
Reality
High ADX means a *trend is in progress*. The trade should already be on. Entering when ADX is at 45 typically means entering near the end of the move, not the start. The best ADX-based entries are when ADX is *rising* from below 20 — the trend is forming and you're getting in early.