Trading robot · MT5

XAU Trading Bot

by Alexdev257

XAU Trading Bot is a MetaTrader 5 expert advisor for gold trading.

High risk

GitHub stars1
Forks0
Last update5 days ago21 Oct 2026
LicenceNone stated

Overview

XAU Trading Bot operates in signal-only mode to issue alerts or auto-trade mode to open and manage positions on XAUUSD. The EA follows OTL concepts using BuBe structure, 12 specific setups including failbreakouts, inside bar breakouts, EMA200 retests, order blocks, and FTR patterns. It requires a minimum of 2 confluences for entries and applies day-profile-based take profits of 20 or 30 pips. Risk controls include equity-based lot sizing at 0.5% per trade, maximum 3 open positions, and a 3-pip spread filter. Time filters block openings during Comex hours, Asia sessions, and initial session minutes. It supports both buy and sell trades with no martingale or grid scaling.

Details

Author

Alexdev257 on GitHub

Type

Trading robot

Platform

MetaTrader 5 (MQL5)

Strategy

SMC / ICT / price action, Multi-strategy, Martingale

Markets

Gold

Timeframes

M15-H1

Risk Profile

  • Uses martingale lot scaling: losses can grow fast

Input Parameters

Read from XAU-trading-bot.mq5. Defaults are the author's; change them in the EA's Inputs tab.

NameTypeDefaultDescription
InpModeENUM_OTL_MODEMODE_SIGNAL_ONLYChế độ hoạt động
InpMagiclong20230508Magic number
InpRiskPercentdouble0.5Risk %/lệnh (theo equity)
InpFixedLotdouble0.0Lot cố định (0 = dùng Risk%)
InpMaxSpreadPipsdouble3.0Spread tối đa (pips) để vào lệnh
InpPipSizeOverridedouble0.0Pip size override (0 = tự nhận, XAU pip = 0.1)
InpMaxOpenPositionsint3Số vị thế mở tối đa của bot
InpAllowBuybooltrueCho phép Buy
InpAllowSellbooltrueCho phép Sell
InpServerToVN_Hoursint4Giờ CỘNG vào giờ server để ra giờ VN (server GMT+3 -> 4)
InpBlockOpenMinutesint10Chặn N phút đầu mỗi phiên (tài liệu: 10-30p ngồi im)
InpAvoidComexbooltrueNé 20h30-21h30 VN (giờ Comex)
Show all 40 inputs
NameTypeDefaultDescription
InpNoAsiaBreakoutbooltruePhiên Á: chặn lệnh breakout (breakout Á = khê)
InpFadeOnlyMonTuebooltrueThứ 2+3: chặn breakout (move = trap)
InpDayProfileENUM_DAY_PROFILEDAY_NORMALLoại ngày hôm nay
InpFlattenBeforeNYLunchboolfalseĐóng lệnh BUY trước 00:00 VN (NY lunch)
InpSwingWingint3Số nến cánh fractal swing M1
InpBreakBufferPipsdouble1.0Đệm phá vỡ/SL (pips) ["+1 pip" của tài liệu]
InpUseBubeGatebooltrueChỉ trade thuận bias BuBe (ngược = chặn tàu)
InpBlockTwoSideRangebooltrueRange lưỡng cực (2 đầu BuBe) -> không vào lệnh
InpTwoSideRangePipsdouble15.0Lưỡng cực: biên swing tối đa (pips)
InpTwoSideMinutesint30Lưỡng cực: cả BuSW & BeSW xảy ra trong N phút
InpUseS1_FailbreakoutbooltrueS1: Failbreakout tại mốc (đóng cửa nhưng fail)
InpUseS2_LFHbooltrueS2: Limit Fill Hike (limit 50% râu)
InpUseS3_C2DSWbooltrueS3: C2DSW Failure (BuBe)
InpUseS4_InsideBarbooltrueS4: Inside bar breakout M1
InpUseS5_FakeyD1booltrueS5: Fakey / Double Insidebar khung D
InpUseS6_BuildUpbooltrueS6: Bob Volman Build-Up (EMA200 M1)
InpUseS7_EMA200booltrueS7: EMA200 M1 retest + Pinbar
InpUseS8_VAReactbooltrueS8: POC/VAH/VAL/NakedPOC scalp
InpUseS9_OpenHuntbooltrueS9: Fade sweep 13h00 (open Frankfurt)
InpUseS10_FTRbooltrueS10: FTR (hunt đỉnh pullback + OSB)
InpUseS11_NewsboolfalseS11: News straddle 2 đầu (OCO)
InpUseS12_OrderBlockbooltrueS12: RBR/DBD Order Block
InpMinConfluenceint2Số lớp xác nhận tối thiểu (tài liệu: >=2)
InpLevelNearPipsdouble5.0Độ gần mốc để tính hội tụ (pips)
InpTP1NormalPipsdouble20.0TP1 ngày thường (pips)
InpTP1SidewayPipsdouble30.0TP1 ngày Á sideway (pips)
InpScalpTPMaxPipsdouble30.0TP scalp tối đa (20-30 pips)
InpBuildUpBarsint25S6: số nến M1 xét vùng nén

How to Install It

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

4 stars

This MetaTrader 5 expert advisor utilizes a combination of Bollinger Bands, Relative Strength Index, and Average Directional Index to identify entries. It supports multi-timeframe analysis for trend confirmation and provides optional filters for Average True Range and price action patterns such as hammers. Risk managem

MT5 Trading robot Trend followingMean reversionSMC / ICT / price action High risk
Updated 1 year ago None stated GitHub repository of Alif BB RSI ADX MTFA

Quantum Alpha MT5 ONNX

by yole-shop-oficial
1 stars

This expert advisor for MetaTrader 5 combines traditional quantitative strategies with machine learning via the ONNX runtime. It features multiple trading modes including Order Blocks, market structure analysis, and a hybrid AI strategy using neural network predictions trained in PyTorch. The system incorporates compre

MT5 Trading robot SMC / ICT / price actionAI / machine learningTrend following High risk
Updated 2 months ago None stated GitHub repository of Quantum Alpha MT5 ONNX

Smart Trader 7CAS

by andersonclement
1 stars

Smart Trader 7CAS is an automated trading robot for MetaTrader 5 designed specifically for commodities including Gold, Silver, and Oil. It implements seven distinct trading modules or scenarios covering trend following, scalping, range trading, breakouts, Smart Money Concepts, reversals, and Fibonacci levels. The syste

MT5 Trading robot Multi-strategySMC / ICT / price actionTrend following High risk
Updated 2 months ago None stated GitHub repository of Smart Trader 7CAS

EA Scalper XAUUSD

by francomascareloai
266 stars

EA Scalper XAUUSD is an automated trading research project for MetaTrader 5 focused on gold. It employs a multifaceted entry strategy using Smart Money Concepts like order blocks and liquidity sweeps, alongside moving average crossovers and Fibonacci zones. The EA includes a self-learning module designed to adapt to di

MT5 Trading robot SMC / ICT / price actionIndicator crossoverScalping High risk
Updated 4 months ago Custom licence GitHub repository of EA Scalper XAUUSD

Gold Trader EA

by mehdi-jahani
141 stars

Gold Trader EA is a multi-strategy expert advisor designed for trading XAUUSD on the MetaTrader 5 platform. It employs a fusion engine that combines up to 14 different technical analysis methods, including candlestick patterns, chart patterns, price action, and institutional levels. The system requires a user-defined n

MT5 Trading robot Multi-strategyTrend followingIndicator crossover
Updated 1 year ago None stated GitHub repository of Gold Trader EA
87 stars

This MetaTrader 5 expert advisor implements Smart Money Concepts including Order Blocks, Fair Value Gaps, and Break of Structure entries. It features an automated mode that combines multiple strategies alongside market regime detection using ADX or Efficiency Ratio to ensure trading in trending conditions. Risk managem

MT5 Trading robot SMC / ICT / price actionTrend followingMulti-strategy
Updated 3 months ago Apache-2.0 GitHub repository of SMC Unified Expert Advisor

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