OPEN-SOURCE SCRIPT

ADX + DI

17
**ADX + DI (Final)** is a clean trend-strength and direction tool built on the classic Wilder **Average Directional Index (ADX)** with optional **+DI / -DI** lines.

* Plots **ADX (red)** to show *trend strength* (not direction).
* Optionally plots **+DI (green)** and **-DI (blue)** to show *directional bias* (bullish when +DI > -DI, bearish when -DI > +DI).
* Includes toggleable horizontal reference levels at **20** and **25** to quickly spot range vs trend regimes.
* Optional background highlighting when **ADX exceeds a user-defined threshold** (default 25) to visually mark “strong trend” conditions.
* Includes alert conditions for:

* **+DI crossing above -DI** (bullish directional shift)
* **-DI crossing above +DI** (bearish directional shift)
* Both crosses **with ADX above the trend threshold** (higher-confidence signals)

**Best use:** filter trades by regime—avoid trend strategies when ADX is low (chop), and focus on pullbacks/breakouts when ADX is rising and above your threshold.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.