Skip to content
72lab

Directional Indicator (DI) EA: no-code builder for MT4 / MT5

TrendThe Directional Indicators (+DI and −DI) compare the strength of upward and downward moves: +DI crossing above −DI is bullish, crossing below is bearish. Often used together with ADX.

Rules you can build with it

Works as an entry rule or an exit rule. Short rules are mirrored automatically.

  • Long+DI crosses above −DI
    Short+DI crosses below −DI
  • Long+DI crosses below −DI
    Short+DI crosses above −DI
  • Long+DI is above −DI
    Short+DI is below −DI
  • Long+DI is below −DI
    Short+DI is above −DI

Settings

SettingsDefaultRange
Period142 – 50

How the backtest and the EA calculate it

+DI and −DI are the second and third lines of MT5's ADX indicator, with the same smoothing.

Signals use only closed candles and are filled at the next candle's open. The exported EA checks conditions in the same order, so you get similar results in the MT5 Strategy Tester.

Example strategies

Example 1
  • Entry · Directional Indicator (DI) (14): +DI crosses above −DI
  • Stop-loss 300 points, take-profit 600 points
Open in the EA Workshop
Example 2
  • Entry · Directional Indicator (DI) (14): +DI crosses above −DI
  • Entry · Moving Average (50, EMA, Close): MA rises
  • Stop-loss 300 points, take-profit 600 points
Open in the EA Workshop

Examples are just a starting point: open one to change settings or add filters, then check it with backtests and robustness tests. Backtest results don't indicate future returns.