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 update3 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

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
13 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 2 months ago None stated GitHub repository of Prem Gold Advisor

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
Updated 5 weeks ago MIT GitHub repository of Grafik Tabranij

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

Tabranij Gold EA

by surgabot
1 stars

Tabranij Gold EA is an MT5 expert advisor that trades XAUUSD gold using multiple strategies including breakout, martingale averaging, grid layering and zigzag bounce entries. It scales lots with a multiplier up to five steps then stops. Exits use fixed stop loss and take profit distances or ATR-scaled signals. Built-in

MT5 Trading robot BreakoutMartingaleGrid High risk
Updated 2 months ago None stated GitHub repository of Tabranij Gold EA

The Gold Reaper

by naming1086
1 stars

The Gold Reaper is a multi-strategy expert advisor for MetaTrader 4 and 5. It trades gold pairs using breakout and reversal entries based on fractals and ATR. Trades enter when spread and frequency conditions are met and exit via trailing stops or time-based rules. The EA includes NFP filters to pause during economic e

MT4MT5 Trading robot BreakoutTrend followingScalping High risk
Updated 6 weeks ago None stated GitHub repository of The Gold Reaper

More gold EAs

Related on ForexR

Need a Broker for MT5?

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

Compare MT5 brokers