Trading robot · MT5

Gold Bar Close MA50 Dynamic SL

by LiinIT

Gold Bar Close MA50 Dynamic SL is a scalping robot for XAUUSD gold on MetaTrader 5.

GitHub stars2
Forks0
Last update2 weeks ago7 Oct 2026
LicenceNone stated

Overview

Gold Bar Close MA50 Dynamic SL enters trades on M1 bar close when the EMA50 is trending in the direction, the bar closes beyond the previous bar high or low, and spread stays under 1.5 with no abnormal volume spike. It places one market order at a time using 0.01 lot size and an initial server-side stop loss of 10 points. The SL moves to break even at entry plus 3 when profit hits plus 4, then applies rolling stop loss based on the lowest high or highest low of the last 15 closed bars minus or plus 0.2, never moving against the trade and optionally trailing stop. No take profit is used. The bar-close logic ensures backtests match live conditions without guessing price inside bars.

Details

Author

LiinIT on GitHub

Type

Trading robot

Platform

MetaTrader 5 (MQL5)

Strategy

Trend following, Breakout, Scalping

Markets

Gold

Timeframes

M1-M5

Risk Profile

No grid, martingale or hedging logic was found in its code or README. That says nothing about how it performs: backtest it first.

Input Parameters

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

NameTypeDefaultDescription
InpTradeSymbolstringXAUUSDm
InpMagicNumberulong999889differs from v5.93 (999888) on purpose
InpSignalTimeframeENUM_TIMEFRAMESPERIOD_M1
InpLotSizedouble0.01
InpRequireBreakoutbooltrueBUY: close > previous high, SELL: close < previous low
InpInitialSLPricedouble10.0
InpUseBreakEvenbooltrue
InpBreakEvenStartdouble4.00
InpBreakEvenOffsetdouble3.00
InpUseRollingSLbooltrue
InpSLTimeframeENUM_TIMEFRAMESPERIOD_M1
InpSLBarsint15
Show all 28 inputs
NameTypeDefaultDescription
InpSLBufferdouble0.20
InpRollingStepdouble0.30
InpUseTrailingSLboolfalse
InpTrailingStartdouble2.00
InpTrailingDistancedouble0.70
InpTrailingStepdouble0.20
InpUseVolumeFilterbooltrue
InpVolumeMA_Periodint20
InpVolumeMultiplierdouble2.0
InpUseMAFilterbooltrue
InpMAMethodENUM_MA_METHODMODE_EMA
InpMAPeriodint50
InpMATimeframeENUM_TIMEFRAMESPERIOD_M1
InpUseMASlopebooltrue
InpMASlopeBarsint3
InpMaxSpreaddouble1.50

How to Install It

  1. 1Download the sourceUse "Download source (.zip)" above, or clone LiinIT/Bot-EA-Trading-XAUUSD-Scaping_MA50 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

Nyao Scalper

by elrizwiraswara
173 stars

Nyao Scalper is an automated scalping robot for MetaTrader 5 that utilizes a multi-factor weighted scoring system to identify trade opportunities. It evaluates trend alignment through EMA crossovers, momentum via RSI, and price action through wick rejection and candle body analysis. The EA manages risk with adaptive AT

MT5 Trading robot ScalpingTrend followingMartingale High risk
Updated 4 months ago BSD-3-Clause GitHub repository of Nyao Scalper

Prop Firm EA Fleet

by cgemise971
20 stars

Prop Firm EA Fleet is a collection of MetaTrader 5 robots designed for passing prop firm evaluations and managing funded accounts. The suite utilizes various strategies including market structure analysis, session range breakouts for London and New York sessions, and high-frequency scalping. It features strict risk man

MT5 Trading robot SMC / ICT / price actionBreakoutScalping High risk
Updated 10 months ago None stated GitHub repository of Prop Firm EA Fleet
5 stars

Universal Market Hunter is an automated trading robot for MetaTrader 5 that targets Forex, gold, and cryptocurrency markets. It allows users to switch between two main strategies: a Bollinger Band volatility breakout and an engulfing price action pattern using volume confirmation. The system manages risk through ATR-ca

MT5 Trading robot BreakoutScalpingTrend following
Updated 1 year ago Apache-2.0 GitHub repository of Universal Market Hunter

Gold Scalper Bot

by bigthreeatone
3 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 4 months ago None stated GitHub repository of Gold Scalper Bot

Atlas EA

by ymk5py-commits
2 stars

Atlas EA is a multi-strategy intraday trading robot for MetaTrader 5, primarily focused on gold, silver, and USDJPY. It identifies market structure shifts using Smart Money Concepts, specifically targeting breaks of structure and fair value gaps during the London and New York sessions. The EA includes optional modules

MT5 Trading robot SMC / ICT / price actionTrend followingBreakout
Updated 7 weeks ago None stated GitHub repository of Atlas EA

Experienced FX Trader

by simonokwundue-ops
1 stars

This collection of Expert Advisors for MetaTrader 5 provides high-frequency scalping and multi-strategy automated trading across multiple currency pairs. The robots utilize a signal scoring system based on moving average crossovers, RSI momentum, Bollinger Band breakouts, and MACD signals. The suite includes a dedicate

MT5 Trading robot ScalpingBreakoutIndicator crossover
Updated 11 months ago None stated GitHub repository of Experienced FX Trader

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