Trading robot · MT5

Arbitrage Grid Bot

by AlessandroGCodeca

This MetaTrader 5 expert advisor implements a multi-pair grid and dollar-cost averaging strategy.

High risk

GitHub stars1
Forks2
Last update5 months ago3 Apr 2026
LicenceNone stated

Overview

Arbitrage Grid Bot monitors a configurable list of currency pairs and determines trade direction using a moving average trend filter. When price moves against an initial position, the bot opens additional levels using fixed, additive, or multiplicative lot scaling. The robot manages risk through an emergency account drawdown limit, optional individual stop losses, and a combined basket take profit target calculated per pair. It supports both market entries and pending limit orders for grid execution.

Details

Author

AlessandroGCodeca on GitHub

Type

Trading robot

Platform

MetaTrader 5 (MQL5)

Strategy

Grid, Martingale, Mean reversion, Indicator crossover

Markets

Forex

Timeframes

Any timeframe

Risk profile

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

Input parameters

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

NameTypeDefaultDescription
InpGridSpacingPipsint12Grid Spacing (pips between levels)
InpMaxGridLevelsint5Max Grid Levels per pair
InpBaseLotSizedouble0.01Base Lot Size (Level 1)
InpLotScaleModeint1Lot Scale: 0=Fixed, 1=Additive(1x,2x,3x), 2=Multiply(1x,2x,4x)
InpBasketTPDollarsdouble5.0Basket Take Profit ($) per pair
InpMaxDrawdownPctdouble30.0Max Account Drawdown (%) - Emergency Close
InpIndividualSLPipsint0Per-Trade SL (pips, 0 = none)
InpIndividualTPPipsint0Per-Trade TP (pips, 0 = none)
InpPairListstringEURUSD,AUDJPY,AUDCAD,GBPAUD,AUDNZDPairs to Trade
InpDirectionsstringAUTO,AUTO,AUTO,AUTO,AUTODirection: AUTO, BUY, or SELL
InpTrendTFENUM_TIMEFRAMESPERIOD_H1Trend Detection Timeframe
InpTrendMAPeriodint50Trend MA Period
Show all 17 inputs
NameTypeDefaultDescription
InpTrendMAMethodint0MA Method: 0=SMA, 1=EMA
InpMaxSpreadPipsint5Max spread (pips) to allow entry
InpUsePendingOrdersbooltrueUse Pending Limit Orders (true) or Market Orders (false)
InpMagicNumberulong888888Magic Number
InpTradeCommentstringArbGridTrade Comment

How to install it

  1. 1Download the sourceUse "Download source (.zip)" above, or clone AlessandroGCodeca/arbitrage-grid-bot 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

IchiDCA CCBSN PropFirm EA

by magicniuniu
3 stars

IchiDCA CCBSN PropFirm EA is an automated trend-following robot for MetaTrader 5, optimized for gold and forex markets. It triggers trades based on Ichimoku Cloud breaks, filtered by dual Exponential Moving Averages and MACD indicators. The strategy manages positions through a Dollar Cost Averaging system that layers u

MT5 Trading robot Trend followingGridMean reversion High risk

Fibonacci ICT EA

by Shifrozy
2 stars

Fibonacci ICT EA for MetaTrader 5 combines institutional price action concepts with Fibonacci retracement levels. It identifies higher timeframe trends and enters on pullbacks to specific golden zones using confirmations like Break of Structure and Fair Value Gaps. The system includes robust risk management such as per

MT5 Trading robot SMC / ICT / price actionIndicator crossoverMean reversion High risk
Updated 3 weeks ago None stated GitHub repository of Fibonacci ICT EA

Blessing Three

by duanwujie
1 stars

This MetaTrader 4 expert advisor is an automated grid trading system that utilizes a variety of indicators including Moving Averages, CCI, Bollinger Bands, and MACD for trade entries. It employs a martingale-style lot multiplier to manage position sizing across sequential grid levels. The software includes risk control

MT4 Trading robot GridMartingaleIndicator crossover High risk
Updated 9 years ago None stated GitHub repository of Blessing Three
1 stars

Strawberry Strategy Tester is a MetaTrader 4 expert advisor designed for automated trading and strategy evaluation. It implements Bollinger Band-based entry logic and offers multiple lot sizing methods, including fixed lots, addition, and multiplication. The use of lot multiplication suggests the expert advisor utilize

MT4 Trading robot Indicator crossoverMartingaleGrid High risk
Updated 3 years ago None stated GitHub repository of Strawberry Strategy Tester

RSI Martingale EA

by peefpee
10 stars

This Expert Advisor for MetaTrader 5 implements a martingale trading strategy triggered by the Relative Strength Index (RSI). It opens an initial position when RSI reaches overbought or oversold thresholds. If price continues to move against the initial trade, the EA layers additional orders at set point intervals, mul

MT5 Trading robot MartingaleMean reversionGrid High risk
7 stars

This MetaTrader 5 expert advisor executes a mean reversion strategy based on price deviation from a Simple Moving Average. It enters short positions when prices rise above the average and long positions when prices fall below. The algorithm utilizes an aggressive grid-based recovery system where both the entry distance

MT5 Trading robot Mean reversionMartingaleGrid High risk

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