Trading robot · MT5

Donchian Trend Follow EA

by WayneTradeFr

This EA is a trend following robot for XAUUSD on MetaTrader 5.

GitHub stars1
Forks0
Last updateyesterday25 Oct 2026
LicenceNone stated

Overview

Donchian Trend Follow EA enters trades using Donchian channel breaks with an ensemble of three periods (30, 60, 120) requiring a minimum of 2 votes. Multiple filters including t-statistic, efficiency ratio, volatility regime, session, spread, news, higher timeframe, and channel compression are applied. Exits use the Donchian exit channel, ATR-based stop loss, partial closes, breakeven, time stop, and optional trailing stop. Lot sizing is based on risk in USD, scalable by votes and volatility. It includes risk controls like daily limits.

Details

Author

WayneTradeFr on GitHub

Type

Trading robot

Platform

MetaTrader 5 (MQL5)

Strategy

Trend following

Markets

Gold

Timeframes

M15-H1

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.

Topics

algorithmic-trading-quantitativemql5quantitative-finance

Input Parameters

Read from Donchian_TrendFollow_EA.mq5. Defaults are the author's; change them in the EA's Inputs tab.

NameTypeDefaultDescription
InpTimeframeENUM_TIMEFRAMESPERIOD_M15timeframe de trading
InpMagicNumberulong20260929
InpEntryPeriodint10canal d'entree (utilise si ensemble OFF)
InpUseEnsembleboolfalse3 canaux qui votent
InpEntryPeriod1int30
InpEntryPeriod2int60
InpEntryPeriod3int120
InpMinVotesint2votes requis (1..3)
InpScaleRiskByVotesboolfalserisque x (votes / 3)
InpExitPeriodint110canal de sortie
InpUseTStatFilterboolfalse
InpTStatPeriodint50
Show all 40 inputs
NameTypeDefaultDescription
InpTStatThresholddouble2.0long : t > +seuil, short : t < -seuil
InpUseERFilterboolfalse
InpERPeriodint20
InpERThresholddouble0.30
InpUseVolRegimeFilterboolfalse
InpATRLongPeriodint100ATR court = InpATR_Period
InpVolRatioMindouble1.0ATR court / ATR long > seuil
InpUseSessionFilterboolfalse
InpSessionStartHourint9inclus
InpSessionEndHourint21exclu
InpUseSpreadFilterboolfalse
InpMaxSpreadPointsint40
InpUseNewsFilterboolfalse
InpNewsCurrencystringUSD
InpNewsMinutesBeforeint30
InpNewsMinutesAfterint30
InpUseHTFFilterboolfalse
InpHTFENUM_TIMEFRAMESPERIOD_H1
InpHTFEMAPeriodint200
InpUseHTFSlopeboolfalseexige aussi la pente de l'EMA dans le sens
InpHTFSlopeBarsint5
InpUseCompressionFilterbooltrue
InpCompressPeriodint20largeur du canal mesuree sur N barres
InpCompressLookbackint200historique pour le percentile
InpCompressMaxPctdouble50.0largeur actuelle <= ce percentile
InpRiskUSDdouble500.0
InpATR_Periodint14
InpATR_Multiplierdouble1.0

How to Install It

  1. 1Download the sourceUse "Download source (.zip)" above, or clone WayneTradeFr/quant-research 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

EA31337

by EA31337
1.3k stars

EA31337 is a comprehensive multi-strategy trading robot and framework for MetaTrader platforms. It features dozens of pre-built strategies utilizing technical indicators like ATR, Moving Averages, and SuperTrend. The system manages entries and exits through a unique filtering system that monitors account metrics, volat

MT5 Trading robot Multi-strategyNewsTrend following
Updated 6 months ago GPL-3.0 GitHub repository of EA31337

EA Scalper XAUUSD

by francomascareloai
266 stars

EA Scalper XAUUSD is an automated trading research project for MetaTrader 5 focused on gold. It employs a multifaceted entry strategy using Smart Money Concepts like order blocks and liquidity sweeps, alongside moving average crossovers and Fibonacci zones. The EA includes a self-learning module designed to adapt to di

MT5 Trading robot SMC / ICT / price actionIndicator crossoverScalping High risk
Updated 4 months ago Custom licence GitHub repository of EA Scalper XAUUSD

EA31337 Libre

by EA31337
256 stars

EA31337 Libre is an open-source, multi-strategy trading robot for MetaTrader 4 and MetaTrader 5. It functions as a simplified implementation of the EA31337 framework, providing a collection of over 35 built-in strategies based on technical indicators. The expert advisor performs independent market analysis across vario

MT5 Trading robot Multi-strategyTrend followingMean reversion
Updated 2 years ago GPL-3.0 GitHub repository of EA31337 Libre

Ladino Bot

by landim32
204 stars

Ladino Bot is an open-source expert advisor for MetaTrader 5 that uses HiLo Activator indicators and moving average crossovers to identify trade entries. It features a triple-timeframe architecture, allowing users to align entries with higher-period trends. Risk controls include daily gain and loss caps, brokerage fee

MT5 Trading robot Indicator crossoverTrend following Archived
Updated 2 years ago GPL-3.0 GitHub repository of Ladino Bot

Nyao Scalper

by elrizwiraswara
173 stars

Nyao Scalper is an automated scalping robot for MetaTrader 5 that utilizes a multi-factor weighted scoring system to identify trade opportunities. It evaluates trend alignment through EMA crossovers, momentum via RSI, and price action through wick rejection and candle body analysis. The EA manages risk with adaptive AT

MT5 Trading robot ScalpingTrend followingMartingale High risk
Updated 4 months ago BSD-3-Clause GitHub repository of Nyao Scalper

Gold Trader EA

by mehdi-jahani
141 stars

Gold Trader EA is a multi-strategy expert advisor designed for trading XAUUSD on the MetaTrader 5 platform. It employs a fusion engine that combines up to 14 different technical analysis methods, including candlestick patterns, chart patterns, price action, and institutional levels. The system requires a user-defined n

MT5 Trading robot Multi-strategyTrend followingIndicator crossover
Updated 1 year ago None stated GitHub repository of Gold Trader EA

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