Collection ยท MT5

MT5 Algorithmic Trading Research

by DamianAcri

This repository features a collection of MetaTrader 5 Expert Advisors developed for strategy and risk-management research.

High risk

GitHub stars1
Forks0
Last update4 weeks ago22 Aug 2026
LicenceMIT

Overview

MT5 Algorithmic Trading Research includes a multi-pair mean reversion grid system, a gold breakout robot using previous day levels, and trend-following strategies based on moving averages. The EAs incorporate extensive risk controls including daily drawdown limits, equity-based circuit breakers, and volatility-adjusted trade spacing. The systems support multiple lot-sizing modes such as fixed volume, dynamic balance-based sizing, and deposit load percentages. The repository serves as a documented framework for exploring automated execution and exposure management.

Details

Author

DamianAcri on GitHub

Type

Collection

Platform

MetaTrader 5 (MQL5)

Strategy

Trend following, Breakout, Mean reversion, Grid, Martingale

Markets

Forex, Gold

Timeframes

M15-H1, H4 and above

Risk profile

  • Uses martingale lot scaling: losses can grow fast
  • Opens a grid of orders: exposure builds up in a trend

Input parameters

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

NameTypeDefaultDescription
InpAllowNewGridbooltrueAllow Opening a new Grid?
InpLotModeENUM_LOT_MODELOT_MODE_DEPOSIT_LOAD_FIXEDLot-sizing Method
InpFixedLotdouble0.01Fixed Lot
InpDynamicLotdouble10000.0Dynamic Lot (Balance per 0.01 lot)
InpDepositLoaddouble0.15Deposit Load % (0.15 = 15%)
InpFixedDepositBasedouble0.0Fixed Deposit Base (0=use initial balance)
InpMaxLotdouble100.0Maximum Lot
InpMaxSpreaddouble10.0Maximum Spread, in pips
InpMaxSlippagedouble10.0Maximum Slippage for non-ECN, in pips
InpMaxSymbolsint2Maximum Symbols at a time
InpMaxOpenLotsdouble0.0Max Open Lots (Filter) [0=disabled]
InpAllowHolidaysboolfalseAllow Trading on Holidays? (basic calendar keyword check)
Show all 40 inputs
NameTypeDefaultDescription
InpTradeDirectionENUM_TRADE_DIRECTIONTRADE_BOTHAllow to Buy/Sell
InpMinFreeMargindouble0.0Minimum Free Margin % [0=disabled]
InpMaxDrawdownPercentdouble100.0Max Floating Drawdown % [100=disabled]
InpMaxDrawdownMoneydouble0.0Max Floating Drawdown in Money [0=disabled]
InpDDActionENUM_DD_ACTIONDD_ACTION_CLOSE_STOPMax Drawdown Action
InpDDCalculationENUM_DD_CALCULATIONDD_CALC_THIS_EAMax Drawdown Calculation
InpDailyDDPercentdouble0.0Max Daily Drawdown % [0=disabled]
InpDailyDDMoneydouble0.0Max Daily Drawdown $ [0=disabled]
InpDailyDDResetHourint0Daily DD reset hour (broker time, 0..23)
InpDailyDDActionENUM_DAILY_DD_ACTIONDAILY_DD_CLOSE_AND_BLOCKDaily DD action
InpDailyDDCalcAccountbooltrueIf true use account equity; else EA-only equity
InpCB_FreezeDDPercentdouble0.0CircuitBreaker A: Freeze grids at DD% (0=off)
InpCB_ReduceDDPercentdouble0.0CircuitBreaker B: Reduce exposure at DD% (0=off)
InpCB_KillDDPercentdouble0.0CircuitBreaker C: Kill-switch at DD% (0=off)
InpSymbolsstringSymbols (comma separated, empty=default)
InpHourStartint0Hour to Start Trading (broker's time)
InpHourStopint0Hour to Stop Trading (0=24h)
InpUseClosedBarSignalbooltrueUse last CLOSED bar price for signal checks
InpRSIEntryModeENUM_RSI_ENTRY_MODERSI_MODE_CAPRSI entry logic mode
InpBBPeriodint20Bollinger Bands Period
InpBBDeviationdouble2.0Bollinger Bands Deviation
InpRSIPeriodint14RSI Period
InpMinRSIint0Min RSI (used by CLASSIC mode; 0=unused)
InpMaxRSIint70Max RSI (cap or classic sell threshold)
InpWorkingTFENUM_TIMEFRAMESPERIOD_M15Working Timeframe
InpTradeDistanceint35Trade Distance (base pips)
InpSmartDistancebooltrueSmart Distance (volatility adjusted)
InpATRPeriodint14ATR Period (for Smart Distance)

How to install it

  1. 1Download the sourceUse "Download source (.zip)" above, or clone DamianAcri/mt5-algorithmic-trading-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

67 stars

This repository contains a large collection of over 100 expert advisors for the MetaTrader 5 platform, many of which appear to be generated using the Mission Automate tool. The library covers a wide variety of trading methodologies including range breakouts, Ichimoku cloud strategies, Heiken Ashi engulfing patterns, an

MT5 Collection Trend followingBreakoutMartingale High risk
Updated 3 years ago None stated GitHub repository of Konz MQL5 EA Collection

Expert MT5 Collection

by GeneralTradingSarl
16 stars

This repository is a large collection of over 1,000 expert advisors designed for the MetaTrader 5 platform. It serves as an open-source library featuring various algorithmic trading strategies, including moving average crossovers, RSI levels, Parabolic SAR, and range breakouts. The collection provides robots for trend

MT5 Collection Trend followingBreakoutGrid High risk
Updated 4 days ago None stated GitHub repository of Expert MT5 Collection
6 stars

This collection provides MetaTrader 5 Expert Advisors sourced from MQL5 programming documentation. The primary tool, Unity Martingale, implements a multi-currency reversal strategy using breakout or pullback signals. It employs a martingale lot-scaling system that increases positions after losses based on a user-define

MT5 Collection MartingaleGridBreakout High risk
5 stars

This repository contains an extensive library of MetaTrader 5 expert advisors covering various algorithmic trading methodologies. The collection includes strategies based on Bollinger Bands, Relative Strength Index, moving average ribbons, and swing failure patterns. A core focus is the Ighodalo series for gold and CFD

MT5 Collection Trend followingBreakoutMartingale High risk
Updated 8 weeks ago Custom licence GitHub repository of Ighodalo MT5 Strategy Collection
4 stars

This repository is a collection of MetaTrader 5 expert advisors developed as early coding projects between 2021 and 2024. It includes multiple robots implementing varied strategies such as range breakouts, Donchian channels, Fibonacci retracements, and Bollinger Bands. The expert advisors are largely technical indicato

MT5 Collection Trend followingBreakoutMean reversion High risk
3 stars

This repository provides a diverse collection of MetaTrader 4 and MetaTrader 5 expert advisors covering multiple trading methodologies. It includes robots for smart money concepts with fair value gap detection, Joe Ross hook patterns, and volatility-based scalping. The library features specific tools for XAUUSD and mul

MT4MT5 Collection SMC / ICT / price actionScalpingBreakout High risk

More collections

Need a broker for MT5?

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

Compare brokers