Trading robot · MT5

17BA Gold Scalper

by jmac17ba

17BA Gold Scalper is an automated trading system for MetaTrader 5 that employs a pending one-cancels-other breakout strategy.

High risk

GitHub stars1
Forks0
Last update2 months ago18 Jul 2026
LicenceNone stated

Overview

17BA Gold Scalper places buy and sell stop orders around the market price; once one triggers, the opposite is cancelled. To manage adverse movements, the EA initiates a Fibonacci recovery basket, adding layers at specific price gaps to reach a consolidated take profit. It includes risk management features such as a drawdown guard that closes all positions at a defined loss percentage and an ATR volatility filter. The system offers two variants for aggressive gold trading or tamer multi-instrument operation.

Details

Author

jmac17ba on GitHub

Type

Trading robot

Platform

MetaTrader 5 (MQL5)

Strategy

Breakout, Martingale, Grid

Markets

Gold, Forex

Timeframes

M1-M5, M15-H1

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 17BA_Chakka.mq5. Defaults are the author's; change them in the EA's Inputs tab.

NameTypeDefaultDescription
InpTPDistdouble0.40TP distance in price units (gold-tuned; auto-scaled if InpAutoScale)
InpRecovGapdouble1.20Gap between recovery levels (gold-tuned; auto-scaled if InpAutoScale)
InpMaxLevelsint12Max recovery levels (1-12). More levels = deeper averaging but much bigger risk
InpMagicint171717
InpSlippageint30
InpEnableLogsbooltrue
InpUseGuardbooltrueMaster switch — turn the drawdown guard off completely
InpMaxLossPctdouble20.0Emergency-close committed basket at this % of balance floating loss
InpAutoScaleboolfalseTurn ON when running on non-gold instruments
InpATRPeriodint14ATR period used for scaling
InpRefATRdouble4.00Reference ATR (price) the fixed distances are tuned at (XAUUSD M15)
InpUseVolFilterbooltrueDon't OPEN new straddles when volatility is elevated
Show all 25 inputs
NameTypeDefaultDescription
InpMaxATRMultdouble1.8"Elevated" = current ATR > this × its recent average
InpVolLookbackint100Bars to average ATR over for the volatility baseline
InpEntryGapdouble0.50Distance from price to each pending stop (price units)
InpUseSessionboolfalse
InpStartHourint1
InpStopHourint23
InpUseOBLQbooltrue
InpOBLookbackint60
InpOBBodyRatiodouble0.55
InpOBBufferdouble0.60
InpLQLookbackint40
InpLQSwingLenint4
InpLQBufferdouble0.50

How to install it

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

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 4 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 4 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 7 weeks ago None stated GitHub repository of Straddle Grid

Inside Bar Grid EA

by danielworthy
1 stars

This MetaTrader 4 robot implements a grid-based hedging strategy triggered by inside bar price formations. It places multiple pending orders on both sides of a breakout and uses martingale lot scaling to increase position sizes for subsequent entries. The expert advisor is designed for the H4 and Daily timeframes, util

MT4 Trading robot BreakoutGridMartingale High risk
Updated 6 months ago None stated GitHub repository of Inside Bar Grid EA

GM Remake

by lawjar
1 stars

GM Remake is an automated trading robot for MetaTrader 4 that executes a multi-stage martingale strategy. It initiates trades based on price breakout logic and manages drawdowns by layering additional positions at user-defined distances. To refine entries, the EA utilizes dual exponential moving averages and MACD trend

MT4 Trading robot MartingaleBreakoutTrend following High risk
Updated 8 months ago Custom licence GitHub repository of GM Remake

Saikyou RSI Breakout

by chanmoto
1 stars

This MetaTrader 4 expert advisor implements a counter-trend strategy based on RSI trendline breakouts and price prediction indicators. It enters trades when the RSI breaks out of support or resistance lines and manages positions using a grid-based approach. The system layers limit and stop orders at fixed intervals, em

MT4 Trading robot BreakoutMean reversionMartingale High risk
Updated 4 years ago None stated GitHub repository of Saikyou RSI Breakout

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