Skip to content
72lab

Donchian Channel EA: no-code builder for MT4 / MT5

ChannelsThe Donchian Channel is the highest high and lowest low of the last N candles. Go long on a close above the upper band, short on a close below the lower. It's the breakout rule used by the Turtle Traders.

Rules you can build with it

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

  • LongPrevious candle closes above Upper channel
    ShortPrevious candle closes below Lower channel
  • LongPrevious candle closes below Lower channel
    ShortPrevious candle closes above Upper channel
  • LongCandle opens above Upper channel
    ShortCandle opens below Lower channel
  • LongCandle opens below Lower channel
    ShortCandle opens above Upper channel

Settings

SettingsDefaultRange
Period205 – 200

How the backtest and the EA calculate it

MT5 has no built-in Donchian Channel, so the exported EA calculates it directly from the highest high and lowest low of the last N candles, exactly as in the backtest.

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 · Donchian Channel (20): Previous candle closes above Upper channel
  • Stop-loss 300 points, take-profit 600 points
Open in the EA Workshop
Example 2
  • Entry · Donchian Channel (20): Previous candle closes above Upper channel
  • 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.