OPEN-SOURCE SCRIPT
DMICROSS(Raw/EMACROSS VER.)

DMI Cross (Raw/EMA Supported)
A practical and lightweight Directional Movement Index (DMI) cross indicator that triggers signals when +DI crosses –DI.
You can freely choose between Raw +DI/–DI or EMA-smoothed +DI/–DI as the source for crossover detection.
Optional features include Raw plots, background highlighting on signals, and a reference ADX line.
Features
Signal Types
BUY: +DI crosses above –DI
SELL: +DI crosses below –DI
Selectable Signal Source
Use Raw DI for faster but noisier signals
Use EMA DI for smoother, more stable signals
Visual Options
Toggle Raw +DI / –DI plots
Constant EMA plots of +DI and –DI for clarity
Optional ADX line for trend strength reference
Background shading on BUY/SELL signals
Inputs
ADX Smoothing (lensig): smoothing length for ADX
DI Length (lenDI): calculation length for +DI/–DI
EMA Length (lenEMA): EMA smoothing length for +DI/–DI
Display Options
Show/hide Raw +DI or –DI
Background tint on signals
Signal Source
Choose between Raw or EMA for crossover detection
Alerts
Four alert conditions are included:
BUY: +DI crossed above –DI (Raw)
SELL: +DI crossed below –DI (Raw)
BUY: +DI crossed above –DI (EMA)
SELL: +DI crossed below –DI (EMA)
Alerts only trigger for the currently selected signal source.
Tips
Use Raw DI for quick reversal detection (more noise).
Use EMA DI for trend-following with fewer false signals.
Combine with ADX filters or higher timeframe trend bias for best results.
Works across all markets and timeframes (adjust parameters as needed).
Disclaimer
This script is provided for educational and informational purposes only.
It does not constitute financial advice. Please trade responsibly.
Would you like me to also write a short “one-liner tagline” (like “Lightweight DMI crossover tool with Raw/EMA options”) for the TradingView title/summary field? That helps it look polished in the public library.
A practical and lightweight Directional Movement Index (DMI) cross indicator that triggers signals when +DI crosses –DI.
You can freely choose between Raw +DI/–DI or EMA-smoothed +DI/–DI as the source for crossover detection.
Optional features include Raw plots, background highlighting on signals, and a reference ADX line.
Features
Signal Types
BUY: +DI crosses above –DI
SELL: +DI crosses below –DI
Selectable Signal Source
Use Raw DI for faster but noisier signals
Use EMA DI for smoother, more stable signals
Visual Options
Toggle Raw +DI / –DI plots
Constant EMA plots of +DI and –DI for clarity
Optional ADX line for trend strength reference
Background shading on BUY/SELL signals
Inputs
ADX Smoothing (lensig): smoothing length for ADX
DI Length (lenDI): calculation length for +DI/–DI
EMA Length (lenEMA): EMA smoothing length for +DI/–DI
Display Options
Show/hide Raw +DI or –DI
Background tint on signals
Signal Source
Choose between Raw or EMA for crossover detection
Alerts
Four alert conditions are included:
BUY: +DI crossed above –DI (Raw)
SELL: +DI crossed below –DI (Raw)
BUY: +DI crossed above –DI (EMA)
SELL: +DI crossed below –DI (EMA)
Alerts only trigger for the currently selected signal source.
Tips
Use Raw DI for quick reversal detection (more noise).
Use EMA DI for trend-following with fewer false signals.
Combine with ADX filters or higher timeframe trend bias for best results.
Works across all markets and timeframes (adjust parameters as needed).
Disclaimer
This script is provided for educational and informational purposes only.
It does not constitute financial advice. Please trade responsibly.
Would you like me to also write a short “one-liner tagline” (like “Lightweight DMI crossover tool with Raw/EMA options”) for the TradingView title/summary field? That helps it look polished in the public library.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.