OPEN-SOURCE SCRIPT
Directional Movement Index - DMI

🎯 Overview
This is a versatile Directional Movement Index (DMI) indicator that provides multiple visualization modes for analyzing trend strength and direction. Unlike traditional DMI displays, this version offers three different viewing options and focuses on DI crossover signals for clear trend identification.
🧩 Core Components
1. ⚙️ Technical Foundation
📊 Primary Calculation: Uses TradingView's built-in ta.dmi() function
📈 Three Core Components:
+DI (Positive Directional Indicator): Measures upward movement strength
-DI (Negative Directional Indicator): Measures downward movement strength
ADX (Average Directional Index): Measures overall trend strength
⚡ Dynamic Average: Creates a composite line (+DI minus -DI) for simplified analysis
2. 🎛️ Configuration Parameters
📏 DMI Length: Default 8 periods (standard setting)
🔄 ADX Smoothing: Additional smoothing for ADX line
🎨 Color Themes: 5 visual schemes consistent with your indicator suite
👁️ Display Toggles:
Average DMI: Shows composite line (+DI minus -DI)
DMI: Shows individual +DI and -DI lines
ADX Smoothing: Shows ADX trend strength line
📈 Signal Interpretation:
🟢 BULLISH: +DI > -DI (upward momentum stronger)
🔴 BEARISH: -DI > +DI (downward momentum stronger)
🎨 Visual Elements:
🚨 Signal Highlights: Background coloring on DI crossovers
📋 Line Labels: On-chart labels for each indicator component
📊 Table Display: Top-right bullish/bearish status indicator
📋 Dashboard Display:
Content: "⬆️ Bullish" or "⬇️ Bearish" based on DI relationship
⚡ Trading Applications
📈 Primary Uses:
🎯 Trend Direction Identification
+DI > -DI = Uptrend
-DI > +DI = Downtrend
💪 Trend Strength Assessment
ADX > 25 = Valid trend (tradable)
ADX < 25 = Weak trend (avoid trading)
ADX rising = Strengthening trend
🚨 Crossover Signals
Bull Crossover: +DI crosses above -DI
Bear Crossover: -DI crosses above +DI
🎨 Customization Options
👁️ Display Flexibility:
📊 Mode 1: Simplified (Average DMI only)
📈 Mode 2: Detailed (+DI and -DI lines)
💪 Mode 3: Strength-focused (ADX line)
🔄 Any Combination: Mix and match as needed
🎨 Visual Themes: (Consistent suite)
🎨 Classic: Green/Red (traditional directional colors)
🚀 Modern: Cyan/Purple (contemporary)
💪 Robust: Amber/Deep Purple (high contrast)
🌈 Accented: Purple/Magenta (vibrant)
⚫⚪ Monochrome: Light Gray/Dark Gray (minimalist)
🔔 Alert System
🟢 LONG Alert: Triggers when +DI crosses above -DI
🔴 SHORT Alert: Triggers when -DI crosses above +DI
📧 Format: Includes ticker symbol for tracking
⚡ Key Advantages
✅ Strengths:
🎯 Multiple Perspectives: Three display modes in one indicator
📊 Clear Trend Signals: DI crossovers provide unambiguous entries/exits
💪 Strength Filter: ADX helps avoid trading in weak trends
👁️ Visual Clarity: Color-coded and labeled for easy interpretation
🔄 Flexible Usage: Can be simple or detailed based on trader preference
📊 Optimal Settings:
⚡ Short-term Trading: 8-14 period length
📊 Medium-term Trading: 14-20 period length
📈 Long-term Trading: 20-50 period length
🎯 ADX Smoothing: Higher values for smoother trend strength
🏆 Unique Features:
Mode Selector: Choose your preferred view (simple → detailed)
Composite Average: (+DI - -DI) creates single directional line
Strength Integration: Built-in ADX for trend validation
Visual Harmony: Consistent design with your indicator family
Professional Labels: On-chart annotations for clarity
This DMI indicator provides professional-grade trend analysis with user-friendly flexibility, allowing traders from beginners to experts to customize their view according to their trading style and experience level! 📊🎯
This is a versatile Directional Movement Index (DMI) indicator that provides multiple visualization modes for analyzing trend strength and direction. Unlike traditional DMI displays, this version offers three different viewing options and focuses on DI crossover signals for clear trend identification.
🧩 Core Components
1. ⚙️ Technical Foundation
📊 Primary Calculation: Uses TradingView's built-in ta.dmi() function
📈 Three Core Components:
+DI (Positive Directional Indicator): Measures upward movement strength
-DI (Negative Directional Indicator): Measures downward movement strength
ADX (Average Directional Index): Measures overall trend strength
⚡ Dynamic Average: Creates a composite line (+DI minus -DI) for simplified analysis
2. 🎛️ Configuration Parameters
📏 DMI Length: Default 8 periods (standard setting)
🔄 ADX Smoothing: Additional smoothing for ADX line
🎨 Color Themes: 5 visual schemes consistent with your indicator suite
👁️ Display Toggles:
Average DMI: Shows composite line (+DI minus -DI)
DMI: Shows individual +DI and -DI lines
ADX Smoothing: Shows ADX trend strength line
📈 Signal Interpretation:
🟢 BULLISH: +DI > -DI (upward momentum stronger)
🔴 BEARISH: -DI > +DI (downward momentum stronger)
🎨 Visual Elements:
🚨 Signal Highlights: Background coloring on DI crossovers
📋 Line Labels: On-chart labels for each indicator component
📊 Table Display: Top-right bullish/bearish status indicator
📋 Dashboard Display:
Content: "⬆️ Bullish" or "⬇️ Bearish" based on DI relationship
⚡ Trading Applications
📈 Primary Uses:
🎯 Trend Direction Identification
+DI > -DI = Uptrend
-DI > +DI = Downtrend
💪 Trend Strength Assessment
ADX > 25 = Valid trend (tradable)
ADX < 25 = Weak trend (avoid trading)
ADX rising = Strengthening trend
🚨 Crossover Signals
Bull Crossover: +DI crosses above -DI
Bear Crossover: -DI crosses above +DI
🎨 Customization Options
👁️ Display Flexibility:
📊 Mode 1: Simplified (Average DMI only)
📈 Mode 2: Detailed (+DI and -DI lines)
💪 Mode 3: Strength-focused (ADX line)
🔄 Any Combination: Mix and match as needed
🎨 Visual Themes: (Consistent suite)
🎨 Classic: Green/Red (traditional directional colors)
🚀 Modern: Cyan/Purple (contemporary)
💪 Robust: Amber/Deep Purple (high contrast)
🌈 Accented: Purple/Magenta (vibrant)
⚫⚪ Monochrome: Light Gray/Dark Gray (minimalist)
🔔 Alert System
🟢 LONG Alert: Triggers when +DI crosses above -DI
🔴 SHORT Alert: Triggers when -DI crosses above +DI
📧 Format: Includes ticker symbol for tracking
⚡ Key Advantages
✅ Strengths:
🎯 Multiple Perspectives: Three display modes in one indicator
📊 Clear Trend Signals: DI crossovers provide unambiguous entries/exits
💪 Strength Filter: ADX helps avoid trading in weak trends
👁️ Visual Clarity: Color-coded and labeled for easy interpretation
🔄 Flexible Usage: Can be simple or detailed based on trader preference
📊 Optimal Settings:
⚡ Short-term Trading: 8-14 period length
📊 Medium-term Trading: 14-20 period length
📈 Long-term Trading: 20-50 period length
🎯 ADX Smoothing: Higher values for smoother trend strength
🏆 Unique Features:
Mode Selector: Choose your preferred view (simple → detailed)
Composite Average: (+DI - -DI) creates single directional line
Strength Integration: Built-in ADX for trend validation
Visual Harmony: Consistent design with your indicator family
Professional Labels: On-chart annotations for clarity
This DMI indicator provides professional-grade trend analysis with user-friendly flexibility, allowing traders from beginners to experts to customize their view according to their trading style and experience level! 📊🎯
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.