OPEN-SOURCE SCRIPT

DMICROSS(Raw/EMACROSS VER.)

93
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.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.