Trading robot · MT5

RB Xauusd Mt5

by RicardoBarato

RB Xauusd Mt5 is a research-grade expert advisor for MetaTrader 5 focused on gold trading.

GitHub stars1
Forks1
Last update3 months ago5 Jun 2026
LicenceGPL-3.0
Latest releasev1.0-source3 months ago

Overview

RB Xauusd Mt5 uses a systematic approach incorporating a 50/200 EMA bias on the H1 timeframe, structural analysis on M15, and volatility filtering via ATR and ADX on the M1 timeframe. The strategy incorporates complex risk management tools, including maximum daily loss limits, trade frequency caps, and a dynamic risk scaler based on signal quality. It includes session-based trading filters and specific cooldown periods after stop-loss events. The repository is a source-only release without pre-configured settings.

Details

Author

RicardoBarato on GitHub

Type

Trading robot

Platform

MetaTrader 5 (MQL5)

Strategy

Trend following, Breakout

Markets

Gold

Timeframes

M1-M5, M15-H1, H4 and above

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.

Topics

algorithmic-tradingbacktestingexpert-advisorgoldmetatrader5mql5open-sourcerisk-managementxauusdmt5

Input parameters

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

NameTypeDefaultDescription
InpAllowedSymbolstringXAUUSD
InpEnableLiveOrdersboolfalse
InpEnableTesterOrdersbooltrue
InpMagicNumberint26060201
InpModeint1
session_reset_hourint20
cooldown_minutes_after_slint15
SpreadMax_pointsint35
SlippageMax_pointsint30
risk_base_pctdouble0.007
max_daily_loss_Rdouble3.0
max_trades_dayint6
Show all 40 inputs
NameTypeDefaultDescription
use_session_filterbooltrue
session1_start_hourint8
session1_end_hourint11
session2_start_hourint13
session2_end_hourint16
trade_hour_maskstringe.g. "8,9,10,13,14"; empty uses session windows
trade_weekday_maskstring1=Mon ... 5=Fri; empty allows all broker weekdays
weekday_risk_multipliersstringe.g. "1:1.0,2:0.8,3:0.8"
hour_risk_multipliersstringe.g. "8:1.0,13:0.8"
min_quality_for_tradedouble0.05
weak_quality_thresholddouble0.35
weak_quality_adx_bonusdouble5.0
weak_quality_impulse_bonusdouble0.30
weak_quality_close_pos_bonusdouble0.04
avoid_first_minutes_of_hourint2
cooldown_seconds_after_order_failint60
allow_buybooltrue
allow_sellbooltrue
ATR_periodint14ATR M1
ADX_periodint14ADX M1
ADX_mindouble25.0
MinATR_pointsint120
TF_biasENUM_TIMEFRAMESPERIOD_H1
EMA_bias_fastint50
EMA_bias_slowint200
TF_structureENUM_TIMEFRAMESPERIOD_M15
structure_lookbackint14
impulse_multdouble2.2

How to install it

  1. 1Download the sourceUse "Download source (.zip)" above, or clone RicardoBarato/xauusd-mt5-expert-advisor 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 3 months ago BSD-3-Clause GitHub repository of Nyao Scalper

Golden Strategist EA

by raracraz
68 stars

This MetaTrader 5 expert advisor specializes in trading Gold (XAUUSD) by targeting volatility during the New York session. It utilizes an Average True Range (ATR) indicator to identify market trends and determine entry levels for limit orders. Risk management includes fixed stop loss parameters and dynamic trailing sto

MT5 Trading robot Trend followingBreakout
Updated 2 years ago None stated GitHub repository of Golden Strategist EA

Black XAU Automated Bot

by phatnomenal
48 stars

Black XAU is an automated trading robot for MetaTrader 5, specifically designed for gold. It utilizes a multi-timeframe breakout and retest strategy, identifying trading zones based on initial H4 market structure. Entries are triggered on the M5 timeframe when price retests a confirmed breakout level. The expert adviso

MT5 Trading robot BreakoutTrend following
Updated 11 months ago None stated GitHub repository of Black XAU Automated Bot

Box Breakout EA

by je-zhou
26 stars

This MetaTrader 5 expert advisor implements a box breakout strategy designed for the foreign exchange market. The robot identifies price ranges during specific time windows and enters trades upon a breakout. It features a trend filter using fast and slow moving averages to align entries with broader market direction. R

MT4MT5 Trading robot BreakoutTrend following

Binario

by EarnForex
20 stars

Binario is a breakout expert advisor for MetaTrader 4 and 5 that utilizes a price channel constructed from two moving averages of the same period. By default, it uses a 144-period exponential moving average applied to both highs and lows. It enters trades when the price moves outside this band by a predefined pip dista

MT4MT5 Trading robot BreakoutTrend following
Updated 1 year ago Apache-2.0 GitHub repository of Binario

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 9 months ago None stated GitHub repository of Prop Firm EA Fleet

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