← Back to Home
Trading Signal / Indicator
🧭

Directional Movement Index (DMI)

The foundation of ADX: identify trend direction with +DI and −DI crossovers.

Start Automating Free →

Want to automate this strategy? Try auto-Trading free — no credit card required.

Directional Movement Index (DMI) chart

Overview

What is Directional Movement Index (DMI)?

The Directional Movement Index (DMI) was developed by J. Welles Wilder Jr. and introduced in his 1978 book "New Concepts in Technical Trading Systems" — the same work that gave us the RSI and ATR. While ADX (which is derived from DMI) measures trend strength, the DMI itself focuses specifically on trend direction through two component lines: +DI (Positive Directional Indicator) and −DI (Negative Directional Indicator).

+DI measures upward directional movement: the portion of each bar's range that represents new ground covered above the prior bar's high. −DI measures downward directional movement: the portion that covers new ground below the prior bar's low. Both are smoothed over a 14-period window (by default) and expressed as percentages of the Average True Range, making them comparable across different instruments.

The primary trading signal is the +DI/−DI crossover: when +DI crosses above −DI, upward directional force exceeds downward force — a buy signal. When −DI crosses above +DI, downward force dominates — a sell signal. Wilder's original Directional Movement System added a refinement: the "Extreme Point Rule," which requires price to exceed the high of the crossover bar (for buys) before entry, reducing false signals.

The separation between +DI and −DI also provides valuable information: when the lines are far apart, the dominant force is strong and clear; when they are close together or frequently crossing, the market is trendless and choppy. This is exactly the information ADX summarises: ADX is derived from the difference between +DI and −DI, smoothed over time.

Understanding DMI separately from ADX helps traders appreciate the direction component distinct from the strength component: a rising ADX with +DI above −DI = a strengthening uptrend. A rising ADX with −DI above +DI = a strengthening downtrend.

How It Works in auto-Trading

Automate It

auto-Trading computes +DI, −DI, and ADX together as a unified Directional Movement System. Strategy blocks support: +DI/−DI crossovers with optional Extreme Point Rule confirmation, threshold-based directional bias signals (+DI > 30 for strong bullish regime), and combined ADX/DMI regime filters (strong trend + bullish direction = trend-following mode active). The DMI suite is a standard component of any trend-following strategy in the auto-Trading builder.

Try Free →

Strategy Code

Pick a script below, copy it, and use it on your chart.

Pine Script (TradingView)

This is a TradingView Pine Script example for this indicator. Paste it into the TradingView Pine Editor, add it to your chart, and adjust inputs for your market and timeframe.

//@version=6
strategy("Directional Movement Index (DMI)", overlay=true)
adxLen = input.int(14, "ADX Length")
emaLen = input.int(100, "Trend EMA")
adx = ta.adx(adxLen)

Get full strategy code access

Enter your email address and full name to unlock this strategy code.

ThinkScript (thinkorswim)

This is a thinkorswim ThinkScript example for this indicator. Open thinkorswim, create a custom study, paste the script, and apply it to your chart.

input adxLength = 14;
input emaLength = 100;
def adxVal = ADX(adxLength);
def emaVal = ExpAverage(close, emaLength);
def buySignal = close > emaVal and adxVal > 25;

Get full strategy code access

Enter your email address and full name to unlock this strategy code.

Ready to automate Directional Movement Index (DMI)?

Join thousands of traders who use auto-Trading to execute this strategy automatically, 24/7.

Get Started Free →

All Strategies & Signals

Continue Learning

Trading Strategies

Trading Signals & Indicators