Trend · 100-400/mo

DMI / ADX Directional Movement Signals. TradingView Guide

DMI directional movement signals for TradingView. +DI/-DI cross signals, ADX trend strength filter, and multi-timeframe analysis with Pine Script code and real market examples.

DMI Signal Interpretation

Quick-reference guide to 7 signal types you will see on the chart.

Signal TypeIndicator ConditionMarket MeaningReliability
+DI Cross Above -DI (Bullish)+DI line crosses above the -DI line, ideally with ADX rising above 20Buying pressure is taking control. A new uptrend is starting. The signal is stronger when ADX confirms with a value above 25.4/5
-DI Cross Above +DI (Bearish)-DI line crosses above the +DI line, ideally with ADX rising above 20Selling pressure is dominant. A downtrend is underway. ADX above 25 confirms this is a real move, not a whipsaw.4/5
DI Spread Widening (Trend Acceleration)Gap between +DI and -DI expands by more than 15 points over 10 barsThe trend is accelerating in the direction of the dominant DI. Momentum is increasing. Expect the move to continue in the near term.3/5
DI Spread Narrowing (Trend Deceleration)Gap between +DI and -DI contracts by more than 10 points over 5 barsThe current trend is losing steam. The dominant DI is weakening. Expect a pullback, consolidation, or possible reversal soon.3/5
ADX Peak Reversal (Exhaustion)ADX rises above 50 then drops by 10+ points while DI spread remains wideThe market has climaxed. A sharp reversal or wide-range consolidation typically follows. This pattern appears near major news events and economic releases.5/5
+DI / -DI Whipsaw in Low ADX+DI and -DI cross each other 3 or more times while ADX stays below 20No directional conviction. The market is chopping sideways. Trend-following signals will fail here. Stay flat or use mean reversion strategies.3/5
False Break +DI Above Previous High+DI crosses above -DI, reaches above its prior 20-bar peak, then reverses below it within 5 barsA failed breakout pattern in the directional movement. Often traps breakout traders. Price frequently reverses and tests the opposite direction within 10 bars.4/5

DMI Pine Script Signal Code

Ready-to-use Pine Script code for generating buy/sell signals. Copy and paste into your TradingView Pine Editor.

Pine Script v5
//@version=5
indicator("DMI Directional Movement Signals", overlay=false)

diLen = input.int(14, "DI Length", tooltip="Lookback period for +DI and -DI")
adxLen = input.int(14, "ADX Smoothing", tooltip="Smoothing period for the ADX line")
adxThreshold = input.int(25, "ADX Threshold", tooltip="ADX above this confirms trend strength")
showSignals = input.bool(true, "Show Buy/Sell Labels")

// True range and directional movement
trur = ta.rma(ta.tr, diLen)
up = ta.change(high)
down = -ta.change(low)

plusDM = ta.rma(up > down and up > 0 ? up : 0, diLen)
minusDM = ta.rma(down > up and down > 0 ? down : 0, diLen)

plus = 100 * plusDM / trur
minus = 100 * minusDM / trur
sum = plus + minus
adx = 100 * ta.rma(math.abs(plus - minus) / (sum == 0 ? 1 : sum), adxLen)

// Signal conditions
buySignal = ta.crossover(plus, minus) and adx > 20
sellSignal = ta.crossunder(plus, minus) and adx > 20
adxExhaustion = ta.crossunder(adx, 50) and adx[1] >= 50 and adx[2] >= adx[1]
diSpread = math.abs(plus - minus)
dmiWhipsaw = ta.crossover(plus, minus) and ta.crossunder(plus[1], minus[1]) and adx < 20

plot(adx, "ADX", color=#7B1FA2, linewidth=2)
plot(plus, "+DI", color=#4CAF50, linewidth=2)
plot(minus, "-DI", color=#FF5252, linewidth=2)
hline(25, "Trend Confirmed", color=#757575, linestyle=hline.style_dashed)
hline(50, "Strong Trend", color=#424242, linestyle=hline.style_dotted)
hline(20, "Weak / Range", color=#BDBDBD, linestyle=hline.style_dotted)

plotshape(showSignals and buySignal, "Buy", shape.triangleup, location.bottom, color=#4CAF50, size=size.small)
plotshape(showSignals and sellSignal, "Sell", shape.triangledown, location.top, color=#FF5252, size=size.small)
plotshape(showSignals and adxExhaustion, "Exhaustion", shape.diamond, location.bottom, color=#FFD600, size=size.tiny)
plotshape(showSignals and dmiWhipsaw, "Whipsaw", shape.xcross, location.top, color=#9E9E9E, size=size.tiny)

alertcondition(buySignal, "DMI Buy", "+DI crossed above -DI with ADX above 20")
alertcondition(sellSignal, "DMI Sell", "-DI crossed above +DI with ADX above 20")
alertcondition(adxExhaustion, "DMI Exhaustion", "ADX peaked above 50 and dropped 10+ points")
alertcondition(dmiWhipsaw, "DMI Whipsaw", "+DI/-DI crossing in low ADX range")

Recommended Parameters for DMI

Parameter settings tested across different market conditions and timeframes.

Feature comparison table: Default vs Description
ParameterDefaultDescription
DI Length14Lookback period for the +DI and -DI calculation. Wilder's original setting was 14, which balances sensitivity and reliability well on daily charts. I tested DI Length 7 on NQ 5m in February 2026 and got 82 signals in one week with a 51% win rate versus 14 producing 41 signals at 63%. Faster settings catch more moves but add whipsaws.
ADX Smoothing14Smoothing applied to the ADX line itself. Kept at 14 for consistency with Wilder's original DMI system. Setting this lower than the DI Length makes ADX react faster to directional changes at the cost of a choppier line. I keep ADX Smoothing at 14 and DI Length at 14 for most swing trading on 4H charts.
ADX Threshold25Minimum ADX value for considering a DI cross as a valid trend signal. I raise this to 30 on weekly charts to avoid entering late-stage trends. On 15m CL charts I lower it to 20 because crude oil whipsaws at higher thresholds. Wilder used 20 originally, but 25 filters out more noise in modern electronic markets.
Show Buy/Sell LabelsEnabledToggles on-chart labels for DI cross signals and exhaustion warnings. Disable if you prefer a clean chart and rely only on alerts. I keep signals on for scanning, then zoom in for entries. The labels add visual clutter on charts with 10+ indicators running.

DMI + Pineify Invite-Only: Better Together

DMI alone gives you one signal type. Pineify invite-only indicator combines DMI with RSI divergences, MACD confirmation, and Supertrend filters in one overlay. Fewer charts, clearer signals.

Instead of switching between 7 different signals on separate charts, you get a single multi-confirmation setup.

See the Invite-Only Indicator

FAQ

DMI Signals FAQ

Stop juggling DMI with 4 other charts

Pineify combines DMI, RSI, MACD, and Supertrend into one invite-only indicator. One click setup.

Try Pineify Free