Trading robot · MT5

GoldTradingBot

by ujamal63-create

GoldTradingBot is an MT5 Expert Advisor that trades XAUUSD using a stop-grid breakout strategy on M1 and M5 timeframes.

High risk

GitHub stars1
Forks1
Last update4 months ago11 Jun 2026
LicenceNone stated

Overview

GoldTradingBot places configurable buy and sell stop orders around the current price with fixed grid spacing and levels when the optional EMA trend filter approves. Lot sizing uses a base lot, custom array, or multiplier. It enters positions via pending orders and exits with per-trade stop loss and take profit (defaults to zero), basket take profit, basket stop loss, basket trailing, and breakeven protection. Risk controls include daily profit and loss limits with close-on-loss option, maximum open trades and pending orders, spread and slippage filters, ATR and ADX volatility filters, and rollover avoidance. Platform is MetaTrader 5. Notable limits include no martingale scaling and conservative lot progression.

Details

Author

ujamal63-create on GitHub

Type

Trading robot

Platform

MetaTrader 5 (MQL5)

Strategy

Breakout, Grid

Markets

Gold

Timeframes

M1-M5, M15-H1

Risk Profile

  • Opens a grid of orders: exposure builds up in a trend

Input Parameters

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

NameTypeDefaultDescription
InpSymbolstringXAUUSD
InpMagicNumberulong260531
InpBaseLotdouble0.01
InpLotStepModeLotStepModeCustomArray
InpCustomLotsstring0.01,0.03,0.05,0.07,0.10
InpMultiplierdouble1.4
InpGridSpacingDollarsdouble2.0
InpGridLevelsint5
InpPendingOrderExpiryMinutesint0
InpDeleteOppositePendingsAfterTriggerbooltrue
InpMaxSpreadPointsint80
InpSlippagePointsint30
Show all 40 inputs
NameTypeDefaultDescription
InpStopLossDollarsdouble0.0
InpTakeProfitDollarsdouble0.0
InpUseBasketTPbooltrue
InpBasketProfitMoneydouble25.0
InpUseBasketSLbooltrue
InpBasketLossMoneydouble50.0
InpUseBasketTrailingbooltrue
InpBasketTrailStartMoneydouble15.0
InpBasketTrailDistanceMoneydouble8.0
InpUseTrailingStopbooltrue
InpTrailingStartDollarsdouble3.0
InpTrailingDistanceDollarsdouble2.0
InpUseBreakEvenbooltrue
InpBreakEvenStartDollarsdouble2.0
InpBreakEvenLockDollarsdouble0.2
InpMaxOpenTradesint10
InpMaxPendingOrdersint10
InpMaxDailyLossMoneydouble100.0
InpMaxDailyProfitMoneydouble100.0
InpCloseTradesOnDailyLossbooltrue
InpTradingStartHourint0
InpTradingEndHourint24
InpAvoidRolloverbooltrue
InpRolloverStartHourint23
InpRolloverEndHourint1
InpFridayCloseHourint20
InpAllowNewGridAfterBasketClosebooltrue
InpUseTrendFilterbooltrue

How to Install It

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

EA XAUUSD Premium

by diditgravatar
4 stars

This MetaTrader 5 expert advisor is designed for gold trading, utilizing a multi-timeframe strategy across the M15, H1, and H4 charts. It integrates technical indicators including ADX, RSI, and Moving Averages to identify trend-following and breakout opportunities. Risk controls include dynamic lot sizing based on acco

MT5 Trading robot Trend followingBreakoutGrid High risk
Updated 1 year ago None stated GitHub repository of EA XAUUSD Premium

Grafik Tabranij

by surgabot
2 stars

Grafik Tabranij is a multi-strategy Expert Advisor for MetaTrader 5 and MetaTrader 4 designed for automated trading. It features five distinct operational modes: breakout, grid averaging, zigzag bounce, signal-based entry, and an A* pathfinding algorithm for optimal price levels. The EA utilizes martingale lot-size sca

MT4MT5 Trading robot BreakoutGridMartingale High risk

Gold Scalper Bot

by bigthreeatone
1 stars

This MetaTrader 5 expert advisor is designed for aggressive trading on XAUUSD, focusing on the 5-minute and 15-minute timeframes. It utilizes Fibonacci retracements and swing high/low breakouts to identify entries across three selectable modes: scalp, swing, and trend following. The system manages up to three positions

MT5 Trading robot ScalpingBreakoutTrend following High risk
Updated 3 months ago None stated GitHub repository of Gold Scalper Bot

Prem Gold Advisor

by Premkumar238
1 stars

Prem Gold Advisor is an automated MetaTrader 5 expert advisor specialized for XAUUSD (Gold) trading on the five-minute timeframe. It initiates trades using breakout levels placed at specific distances from the candle open. The strategy features a progressive scale-in mechanism, adding new orders as the price hits succe

MT5 Trading robot BreakoutTrend followingMartingale High risk
Updated 7 weeks ago None stated GitHub repository of Prem Gold Advisor

Bakome Bitcoin EA

by BAKOME-Hub
1 stars

Bakome Bitcoin EA is a trend-following robot optimized for trading BTCUSD on the MetaTrader 5 platform. It generates trade signals using an exponential moving average crossover combined with price breakouts on the H1 timeframe. The system features a grid recovery module that adds positions with a lot multiplier when tr

MT5 Trading robot Trend followingBreakoutGrid High risk
Updated 5 months ago MIT GitHub repository of Bakome Bitcoin EA

Straddle Grid

by wolfbomb
1 stars

Straddle Grid is an automated trading robot for MetaTrader 5 that deploys bidirectional stop-order grids based on fixed price distances. The expert advisor utilizes a gates system to filter entries by ATR volatility, spread limits, and specific GMT trading sessions. It manages positions as a basket with currency-based

MT5 Trading robot GridBreakoutNews High risk
Updated 2 months ago None stated GitHub repository of Straddle Grid

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