P
PipsGrowth

Key Takeaways

Difficulty:Intermediate
Reliability:High
Category:trend
Timeframes:4H, Daily, Weekly

Directional Movement Index (DMI)

trendšŸ“Š 4H, Daily, Weekly

System including +DI, -DI lines that measure trend direction, used with ADX.

Formula

Code
+DI = (Smoothed +DM / ATR) Ɨ 100
-DI = (Smoothed -DM / ATR) Ɨ 100

Detailed Explanation

DMI is the directional component of the ADX system, showing whether buyers or sellers are in control.

Components:
- +DI: Measures upward price movement
- -DI: Measures downward price movement
- Combined with ADX for complete picture

Trading Setup Example

Entry, stop loss, and take profit levels.

šŸ“ˆ Buy Setup
DMI25ADX>25EntryTake ProfitStop LossCandlesADX+DI-DIBUY
šŸ“‰ Sell Setup
DMI25ADX>25EntryTake ProfitStop LossCandlesADX+DI-DISELL

Always wait for signal confirmation before entering a trade.

Where This Indicator Works Best

Trend context and market position.

šŸ“ˆ Bullish Context
DMIStrong Uptrend ↑Best Fit āœ“Continues →
šŸ“‰ Bearish Context
DMIStrong Downtrend ↓Best Fit āœ“Continues →

Works best in strongly trending markets.

Live Chart — Directional Movement Index (DMI)

See Directional Movement Index (DMI) in action on a live chart. Try changing the settings and timeframe.

Directional Movement Index (DMI) is a manual drawing tool or chart type and cannot be auto-overlaid as a study.

Open Chart on TradingView

Parameters

Period
Default: 14
DMI period

šŸ“ˆ Bullish Signals

+DI crosses above -DI, especially when ADX is rising

šŸ“‰ Bearish Signals

-DI crosses above +DI, especially when ADX is rising

Python Implementation

DMI calculation

Python
import pandas_ta as ta
dmi = ta.adx(df['high'], df['low'], df['close'], length=14)
df['Plus_DI'] = dmi['DMP_14']
df['Minus_DI'] = dmi['DMN_14']
df['ADX'] = dmi['ADX_14']

TradingView Pine Script

JavaScript
//@version=5
indicator("DMI")
[plus, minus, adx] = ta.dmi(14, 14)
plot(plus, "+DI", color=color.green)
plot(minus, "-DI", color=color.red)
plot(adx, "ADX", color=color.blue)
šŸ“Š Use TradingView for Advanced Charting
Professional analysis tools with 100+ technical indicators
Get TradingView Pro

MT5 MQL5 Code

C++
int adx_handle = iADX(_Symbol, _Period, 14);
double plus_di[], minus_di[], adx[];
CopyBuffer(adx_handle, 0, 0, 100, adx);
CopyBuffer(adx_handle, 1, 0, 100, plus_di);
CopyBuffer(adx_handle, 2, 0, 100, minus_di);

Common Mistakes

āœ—Trading DI crossovers without ADX confirmation
āœ—Ignoring low ADX readings

Confirmation Signals

ADX above 25
Price action
Volume

Best For

Trend directionTrend strength with ADXCrossover signals

šŸ’” Pro Tips

  • •Always use with ADX
  • •DI crossovers are trend signals
  • •Works best when ADX > 25
Last updated: February 8, 2026

Educational Disclaimer

This content is for educational purposes only and does not constitute financial or investment advice. Trading involves significant risk and you may lose your capital. Always consult a licensed financial advisor before making investment decisions.

Frequently Asked Questions

Directional Movement Index (DMI) - Complete Guide with Python & TradingView Code