Directional Indicator (+DI/-DI)
period
= 14 (10–30) Overview
The Directional Indicators, consisting of Plus Directional Indicator (+DI) and Minus Directional Indicator (-DI), are fundamental components of Welles Wilder's revolutionary Directional Movement System introduced in 1978. These indicators go beyond simple trend identification by quantifying the strength of bullish versus bearish momentum, providing traders with a clear view of which force currently dominates the market.
What makes the DI indicators unique is their focus on directional movement rather than just price change. By comparing the current high/low to the previous high/low, they capture the market's ability to make new extremes in either direction. When +DI is above -DI, buyers are in control; when -DI dominates, sellers rule. The crossovers between these lines often signal trend changes before they become apparent in price action alone.
How It Works
The DI calculation involves measuring directional movements:
- Calculate +DM: Upward directional movement (current high - previous high)
- Calculate -DM: Downward directional movement (previous low - current low)
- Determine Dominant Direction: Use larger of +DM or -DM (set other to 0)
- Smooth with ATR: Apply Wilder's smoothing and normalize by ATR
- Create Indicators: +DI and -DI oscillate between 0 and 100
+DM = Current High - Previous High (if positive, else 0)
-DM = Previous Low - Current Low (if positive, else 0)
If +DM > -DM and +DM > 0: Use +DM, set -DM = 0
If -DM > +DM and -DM > 0: Use -DM, set +DM = 0
If +DM = -DM: Both = 0
Smoothed +DM = Previous Smoothed +DM - (Previous Smoothed +DM / Period) + Current +DM
Smoothed -DM = Previous Smoothed -DM - (Previous Smoothed -DM / Period) + Current -DM
+DI = (Smoothed +DM / ATR) × 100
-DI = (Smoothed -DM / ATR) × 100
Key Features
- Directional Strength: Measures bullish vs bearish momentum
- Normalized Values: 0-100 scale for easy comparison
- Trend Identification: Clear view of dominant market direction
- Early Signals: Crossovers often precede price trend changes
Interpretation & Trading Signals
DI Analysis
Directional Dominance:
- +DI > -DI: Bullish momentum dominant
- -DI > +DI: Bearish momentum dominant
- Wide Spread: Strong trending conditions
- Narrow Spread: Weak trend or consolidation
Trading Signals:
- +DI Crosses Above -DI: Bullish signal, uptrend starting
- -DI Crosses Above +DI: Bearish signal, downtrend starting
- Extreme Readings (>40): Strong directional movement
- Both DIs Below 20: Lack of directional movement
Strengths
- Clear directional signals
- Works well in trending markets
- Early trend change detection
- Complements ADX perfectly
- Objective and quantifiable
Limitations
- Whipsaws in ranging markets
- Lagging indicator by nature
- Requires confirmation from other tools
- Less effective in choppy conditions
- Can remain extended in strong trends
Example Usage
Code examples will be available once the Rust implementation is complete.