XAUUSD Scalper integrates four distinct strategy modules—SweepReversal, VolBreakout, TrendPullback, and MeanReversion—under a shared risk manager. The EA automatically classifies market conditions and applies the most suitable strategy. Risk management features include equity-drawdown-aware lot sizing, a daily loss limit, an equity breaker, and trailing stops based on Average True Range. Note that calendar news filtering is unavailable during strategy backtesting.
Four regime-adaptive strategy modules
Equity drawdown circuit breaker with dynamic lot sizing
Read from XauusdScalper.mq5. Defaults are the author's; change them in the EA's Inputs tab.
Name
Type
Default
Description
InpMagic
long
26092300
Base magic (strategies use +1..+9)
InpSignalTF
ENUM_TIMEFRAMES
PERIOD_M5
Signal timeframe
InpComment
string
XS
Order comment prefix
InpShowDashboard
bool
true
Show on-chart status
InpRiskProfile
ENUM_RISK_PROFILE
PROFILE_BALANCED
Risk profile
InpRiskBase
ENUM_RISK_BASE
RISK_BASE_MIN
Risk % is taken from
InpMaxDrawdownPercent
double
0.0
Max equity DD % (0 = use profile)
InpMaxLots
double
0.0
Hard lot cap (0 = none)
InpMaxMarginUsePct
double
30.0
Max % of free margin per new trade
InpMinLotRiskTolerance
double
1.5
Allow min lot up to N x target risk
InpCommissionPerLot
double
7.0
Round-turn commission per lot (account ccy)
InpDailyProfitTargetPct
double
0.0
Stop new trades after +X% today (0 = off)
Show all 40 inputs
Name
Type
Default
Description
InpDDPauseHours
int
24
Breaker pause hours (0 = halt until reset)
InpCloseOnBreaker
bool
false
Close all when equity-DD breaker trips
InpCloseOnDailyLimit
bool
true
Close all when daily loss limit hits
InpRequireRiskFreeToAdd
bool
false
Add positions only if others are at breakeven
InpMinMinutesBetween
int
3
Minimum minutes between entries
InpResetRiskState
bool
false
Reset persisted peak / limits / breaker
InpCRiskPct
double
1.0
Risk per trade %
InpCDailyLossPct
double
3.0
Daily loss limit %
InpCMaxDDPct
double
12.0
Max drawdown breaker %
InpCThrottleDDPct
double
6.0
Throttle risk from drawdown %
InpCThrottleFactor
double
0.5
Risk multiplier while throttled
InpCMaxPositions
int
2
Max open positions
InpCMaxOpenRiskPct
double
2.0
Max total open risk %
InpCMaxTradesPerDay
int
18
Max entries per day
InpCSlAtrMult
double
1.8
Base stop = ATR x
InpCMaxStopAtrMult
double
3.5
Skip if stop must exceed ATR x
InpCBeTriggerR
double
0.8
Breakeven trigger (R)
InpCBeLockR
double
0.1
Profit locked at breakeven (R)
InpCPartialPct
double
50.0
% closed at breakeven trigger
InpCTrailStartR
double
1.0
Start trailing at (R)
InpCTrailAtrMult
double
1.8
Trailing distance ATR x
InpCTpR
double
1.8
Take profit (R, 0 = trail only)
InpCLossStreak
int
3
Losing streak length for cool-down
InpCLossStreakFactor
double
0.5
Risk multiplier after streak
InpCLossStreakPauseMin
int
30
Cool-down minutes after streak
InpStructBufferAtr
double
0.3
Buffer beyond structure / sweep extreme (ATR)
InpMinStopDistance
double
3.0
Absolute minimum stop (price units, $ on gold)
InpMinStopSpreadMult
double
8.0
Stop >= spread x
How to Install It
1Download the sourceUse "Download source (.zip)" above, or clone kezyandrew/xauusd-scalper from GitHub, and unzip it.
2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL5/Experts.
3Copy the filesCopy the .mq5 file into Experts, and any .mqh files into the Include folder the code expects.
4Compile in MetaEditorOpen the file in MetaEditor and press Compile. Fix any missing includes the compiler reports.
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.
This expert advisor for MetaTrader 5 is a multi-strategy system that utilizes market regime detection to switch between trend following, range trading, and breakout modes. It incorporates a wide array of technical indicators, including Moving Averages, RSI, MACD, Ichimoku, and SuperTrend. The bot manages risk through v
This automated trading robot for MetaTrader 5 implements Smart Money Concepts (SMC) and ICT principles using a hybrid architecture. Trading logic and signal detection are processed within a native C++ DLL, while the MQL5 bridge handles trade execution and data feeding. The system identifies market structure shifts, inc
MT5Trading robotSMC / ICT / price actionBreakoutTrend following
This MetaTrader 5 expert advisor combines Bollinger Band mean-reversion, squeeze breakouts, and EMA crossover trend following. It filters for ranging markets using a long-period EMA slope to execute reversal trades with candlestick confirmation, specifically identifying Doji patterns at the bands. Risk management inclu
This MetaTrader 5 expert advisor executes a multi-stage trading strategy focusing on H1 trendline breakouts and RSI divergences. It refines entries on the M5 timeframe using Change of Character and micro Break of Structure signals. The EA includes automated risk management with percentage-based lot sizing and ATR-based
MT5Trading robotSMC / ICT / price actionBreakoutTrend following
This MetaTrader 5 expert advisor focuses on the EURUSD pair using an adaptive market regime approach. It alternates between trend-following and mean-reversion logic based on ADX and EMA indicators. The trend strategy utilizes price breakouts or pullbacks confirmed by RSI, while the range strategy employs Bollinger Band
Gold FX EA is a multi-asset trading robot for MetaTrader 5 that functions as a modular framework for various technical strategies. It allows users to toggle specific modules for forex, gold, silver, cryptocurrencies, and commodities. Strategies include trend following with moving averages, Bollinger Band mean reversion