Trading robot · MT5

Donchian MACD Breakout EA

by fuimeng85

This MetaTrader 5 expert advisor executes a trend-following strategy based on Donchian Channel breakouts and MACD filters across multiple timeframes.

GitHub stars1
Forks0
Last update4 months ago7 May 2026
LicenceNone stated

Overview

Donchian MACD Breakout EA utilizes a higher timeframe for trend direction while identifying entry opportunities on lower timeframes. The robot includes a trend memory mode designed to manage entries after price retracements. Risk management features include per-timeframe trailing stops, ATR-based volatility filters, and configurable EMA exits for profit-taking. It provides visual on-chart indicators for Donchian levels and price protection structures.

Details

Author

fuimeng85 on GitHub

Type

Trading robot

Platform

MetaTrader 5 (MQL5)

Strategy

Breakout, Trend following, Indicator crossover

Markets

Any symbol

Timeframes

M1-M5, M15-H1, H4 and above

Risk profile

No grid, martingale or hedging logic was found in its code or README. That says nothing about how it performs: backtest it first.

Input parameters

Read from Breakout(v5.55).mq5. Defaults are the author's; change them in the EA's Inputs tab.

NameTypeDefaultDescription
InpHTFENUM_TIMEFRAMESPERIOD_H4
InpDonchianPerint20
InpMinChRangePtsint300
InpUseATRFilterboolfalse
InpATRPeriodint14
InpATRMultdouble1.5
InpUseTrendMemoryboolfalse启用“突破后趋势记忆/延续”模式(?
InpMem_BreakCandleLevelbooltrueA) 突破K低/高保护:BUY用突破K低点,SELL用突破K高点
InpMem_XBarsLevelbooltrueB) X根HTF结构位保护:BUY用最近X根HTF最低,SELL用最近X根HTF最高
InpMem_XBarsLookbackint3X=几根HTF(含突破K)
InpMem_PctRetraceLevelbooltrueC) 百分比回撤保护:基于突破后最高/最低与breakLevel的回撤百分比
InpMem_RetracePercentdouble50.0?
Show all 40 inputs
NameTypeDefaultDescription
InpShowTM_Linesbooltrue画出 Donchian / XBars / Memory 水平线
InpShowTM_Historyboolfalse是否保留历史线(开启后每次突破都保留;否则只保留当前)
InpShowTM_MaxHistoryint50历史线最大保留数量(每种线各自计算)
InpShowTM_DonchianLinebooltrue显示 Donchian Break 线
InpShowTM_XBarsLinebooltrue显示 XBars Protect 线
InpShowTM_MemoryLinebooltrue显示 Trend Memory Active 线
InpShowTM_LabelFontSizeint9标签字体大小
InpUseH4booltrue
InpUseH1booltrue
InpUseM30booltrue
InpUseM15booltrue
InpUseM5booltrue
InpH4_IgnoreDonchianboolfalse
InpH1_IgnoreDonchianboolfalse
InpM30_IgnoreDonchianboolfalse
InpM15_IgnoreDonchianboolfalse
InpM5_IgnoreDonchianboolfalse
InpH4_UseBreakScanboolfalse
InpH4_BreakScanBarsint5
InpH4_BreakScanModeEMacdScanModeMACD_SCAN_CROSS
InpH1_UseBreakScanboolfalse
InpH1_BreakScanBarsint5
InpH1_BreakScanModeEMacdScanModeMACD_SCAN_CROSS
InpM30_UseBreakScanboolfalse
InpM30_BreakScanBarsint5
InpM30_BreakScanModeEMacdScanModeMACD_SCAN_CROSS
InpM15_UseBreakScanboolfalse
InpM15_BreakScanBarsint5

How to install it

  1. 1Download the sourceUse "Download source (.zip)" above, or clone fuimeng85/mt5-breakout-ea from GitHub, and unzip it.
  2. 2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL5/Experts.
  3. 3Copy the filesCopy the .mq5 file into Experts.
  4. 4Compile in MetaEditorOpen the file in MetaEditor and press Compile. Fix any missing includes the compiler reports.
  5. 5Test before you tradeRun it in the Strategy Tester, then attach it to a demo chart and allow algorithmic trading.
Third-party code. ForexR did not write, test or endorse this EA, and the summary above was generated automatically from its README and code. ForexR lists only repositories with readable source code and never hosts files. Read the code, backtest it and use a demo account first; automated trading can lose money quickly.

Similar expert advisors

3 stars

This MetaTrader 5 expert advisor executes trades based on the Ichimoku Kinko Hyo system, specifically targeting cloud breakouts. It incorporates several technical filters including Average True Range for volatility and Average Directional Index for trend strength to refine entries. Risk management is handled through pe

MT5 Trading robot Trend followingBreakoutIndicator crossover
Updated 3 years ago None stated GitHub repository of Ichimoku Cloud Breakout AR
2 stars

This MetaTrader 5 expert advisor combines Bollinger Band mean-reversion, squeeze breakouts, and EMA crossover trend following. It filters for ranging markets using a long-period EMA slope to execute reversal trades with candlestick confirmation, specifically identifying Doji patterns at the bands. Risk management inclu

MT5 Trading robot Mean reversionBreakoutIndicator crossover
2 stars

This MetaTrader 5 expert advisor focuses on the EURUSD pair using an adaptive market regime approach. It alternates between trend-following and mean-reversion logic based on ADX and EMA indicators. The trend strategy utilizes price breakouts or pullbacks confirmed by RSI, while the range strategy employs Bollinger Band

MT5 Trading robot Trend followingBreakoutMean reversion

Experienced FX Trader

by simonokwundue-ops
1 stars

This collection of Expert Advisors for MetaTrader 5 provides high-frequency scalping and multi-strategy automated trading across multiple currency pairs. The robots utilize a signal scoring system based on moving average crossovers, RSI momentum, Bollinger Band breakouts, and MACD signals. The suite includes a dedicate

MT5 Trading robot ScalpingBreakoutIndicator crossover
Updated 10 months ago None stated GitHub repository of Experienced FX Trader

XAU Confluence EA

by sapsyhere01-max
1 stars

XAU Confluence EA is an automated trading robot for MetaTrader 5, specifically tailored for the gold market. The system executes trades based on a triple-confluence strategy that integrates an exponential moving average ribbon for trend direction, Donchian Channel breakouts with volume confirmation, and a proxy-CVD ind

MT5 Trading robot Trend followingBreakoutIndicator crossover
Updated 2 months ago None stated GitHub repository of XAU Confluence EA

GBPJPY Trader

by AidanB21
1 stars

This automated expert advisor for MetaTrader 5 is specifically designed for the GBPJPY currency pair. It utilizes a breakout strategy based on psychological key price levels, which are adjustable in the settings. The bot filters entries using two Simple Moving Averages and the Average Directional Index to confirm trend

MT5 Trading robot BreakoutTrend followingIndicator crossover
Updated 2 years ago None stated GitHub repository of GBPJPY Trader

More trading robots

Need a broker for MT5?

Compare regulated brokers that support MetaTrader, with spreads, minimum deposits and leverage side by side.

Compare brokers