ADX and DI mt4

### ADX and DI v1.00

Faithful MQL4/MQL5 port of BeikabuOyaji's "ADX and DI" indicator from TradingView, one of the most widely used ADX implementations on the platform with over 43,000 users. It displays +DI, −DI, and ADX in a single subwindow, using a hybrid smoothing approach — Wilder's method for the Directional Indexes and a simple moving average for the ADX line.

#### How it works

The indicator implements Welles Wilder's Directional Movement System with one notable variation in the final ADX calculation:

- **True Range, +DM, −DM** are calculated per Wilder's original definitions with mutual exclusivity between directional movements
- **Smoothing of TR, +DM, −DM** uses Wilder's running sum method: S(i) = S(i−1) − S(i−1)/N + value
- **+DI and −DI** are derived as the ratio of smoothed directional movement to smoothed True Range, expressed as percentages
- **DX** measures the normalized difference between +DI and −DI
- **ADX** is computed as a **simple moving average (SMA)** of DX over the selected period — not Wilder's SMMA as in the classical formulation

This SMA-based ADX responds faster to trend changes than the traditional Wilder/SMMA version, crossing threshold levels earlier in both directions.

#### Visual features

- **Green line**: +DI (bullish directional strength)
- **Red line**: −DI (bearish directional strength)
- **Navy line** (thicker): ADX (trend strength regardless of direction)
- **Horizontal level**: configurable threshold reference line (default 20)

#### Parameters

| Parameter | Default | Description |
|-----------|---------|-------------|
| Period | 14 | Smoothing period for Wilder's calculation and SMA window for ADX |
| Threshold | 20 | Horizontal reference level drawn on the indicator panel |

#### Key characteristics

- Produces values that differ from MetaTrader's built-in iADX (EMA-based) and iADXWilder (SMMA-based) due to the hybrid SMA approach
- Does not repaint: all values are fixed once the bar closes
- Available for both MetaTrader 4 and MetaTrader 5
- Works on all symbols and timeframes; best suited for H1, H4, and Daily charts
- Initialization starts from zero (replicating Pine Script's nz() behavior); values converge fully after approximately 100–150 bars

#### Original source

[ADX and DI]() by BeikabuOyaji — published February 16, 2015, updated to Pine Script v4 on January 28, 2021. Licensed under Mozilla Public License 2.0.


More from author
SuperTrend for MT5
Ulises Calderon Bautista
4.83 (6)
The popular "SuperTrend" indicator is a technical analysis tool that helps identify the direction of a trend and potential entry or exit points in financial markets. The indicator is based on the Average True Range (ATR), which measures market volatility based on price ranges. It's free on other platforms and there's no reason it shouldn't be here as well! It's commonly used in three ways: To Identify the Current Trend: When the price is above this line, it's considered an uptrend, and when the
FREE
UTBot Alerts
Ulises Calderon Bautista
UT Bot Alerts — ATR Trailing Stop System Faithful MQL5 & MQL4 conversion of the legendary "UT Bot Alerts" indicator by QuantNomad from TradingView. Originally developed by Yo_adriiiiaan with the core idea by HPotter, and refined into Pine Script v4 with alerts by QuantNomad (Vadim Cissa) — one of the most followed quant developers on TradingView with over 100K followers. The original script has accumulated 1.1 million+ views and 35,500+ favorites on TradingView, making it one of the most popular
FREE
Double or Triple EMA Envelope
Ulises Calderon Bautista
5 (1)
The Exponential Moving Averages (Double or Triple) Envelopes Indicator is a technical analysis tool designed to assist you in identifying trends and potential reversal points in the financial market. This indicator offers traders the flexibility to choose between two types of exponential moving averages: the Double Exponential Moving Average (DEMA) or the Triple Exponential Moving Average (TEMA). Key Features: Double or Triple Exponential: Switch between DEMA and TEMA based on your analysis pre
FREE
The "Envelope of Adaptive Moving Average" indicator is a tool to assist you in making informed decisions in the financial market. It is designed to provide you with a clear view of the trend direction and potential entry and exit points in your trades. This indicator is based on an adaptive moving average, which means it automatically adjusts to changes in market volatility. This makes it especially useful in markets that can be both calm and volatile. The indicator displays two lines that enve
FREE
SuperTrend for MT4
Ulises Calderon Bautista
The popular "SuperTrend" indicator is a technical analysis tool designed to help identify trend direction and potential entry or exit points in financial markets. This indicator is built upon the Average True Range (ATR) , which gauges market volatility based on price ranges. It is available for free on other platforms, and this should be no exception! Common Use Cases The SuperTrend is typically utilized in three primary ways: Trend Identification: When the price is trading above the indicator
FREE
UT Bot Alerts for MT4
Ulises Calderon Bautista
UT Bot Alerts — ATR Trailing Stop System Faithful MQL5 & MQL4 conversion of the legendary "UT Bot Alerts" indicator by QuantNomad from TradingView. Originally developed by Yo_adriiiiaan with the core idea by HPotter, and refined into Pine Script v4 with alerts by QuantNomad (Vadim Cissa) — one of the most followed quant developers on TradingView with over 100K followers. The original script has accumulated 1.1 million+ views and 35,500+ favorites on TradingView, making it one of the most popular
FREE
BollingerRSI Strategy MT4
Ulises Calderon Bautista
### Bollinger + RSI, Double Strategy v1.1 Faithful MQL4/MQL5 port of ChartArt's popular TradingView strategy (41,800+ users, 990+ favorites). Generates buy and sell signals only when **both indicators confirm simultaneously** — RSI momentum shift + Bollinger Band breakout on the same candle. **How it works** The strategy uses an unconventional configuration: a fast RSI(6) with its crossover level set at 50 (acting as a momentum direction filter, not an overbought/oversold detector), combined
FREE
BollingerRSI Strategy
Ulises Calderon Bautista
### Bollinger + RSI, Double Strategy v1.1 Faithful MQL4/MQL5 port of ChartArt's popular TradingView strategy (41,800+ users, 990+ favorites). Generates buy and sell signals only when **both indicators confirm simultaneously** — RSI momentum shift + Bollinger Band breakout on the same candle. **How it works** The strategy uses an unconventional configuration: a fast RSI(6) with its crossover level set at 50 (acting as a momentum direction filter, not an overbought/oversold detector), combined
FREE
ADX and DI mt5
Ulises Calderon Bautista
### ADX and DI v1.00 Faithful MQL4/MQL5 port of BeikabuOyaji's "ADX and DI" indicator from TradingView, one of the most widely used ADX implementations on the platform with over 43,000 users. It displays +DI, −DI, and ADX in a single subwindow, using a hybrid smoothing approach — Wilder's method for the Directional Indexes and a simple moving average for the ADX line. #### How it works The indicator implements Welles Wilder's Directional Movement System with one notable variation in the fina
FREE
Filter:
No reviews
Reply to review