This MetaTrader 5 collection provides specialized robots for trading XAUUSD, featuring a range-based mean reversion system and a trend-following expert advisor.
The primary mean reversion strategy utilizes RSI, Bollinger Bands, and previous daily highs and lows to identify reversal points. It includes comprehensive risk controls such as ATR-based stop losses, hard lot caps, and a margin safety filter. The system can manage active trades through partial closes and break-even adjustments. Advanced filtering options include ADX trend strength, EMA slope detection, and specific session time windows.
Read from XAU_RangeMeanReversion.mq5. Defaults are the author's; change them in the EA's Inputs tab.
Name
Type
Default
Description
Inp_Symbol
string
XAUUSD
Symbol
Inp_Timeframe
ENUM_TIMEFRAMES
PERIOD_M15
Signal timeframe
Inp_RSI_Period
int
14
Inp_RSI_Oversold
double
30.0
Inp_RSI_Overbought
double
70.0
Inp_BB_Period
int
20
Inp_BB_Dev
double
2.0
Inp_ATR_Period
int
14
Inp_Range_Source
RangeMode
RANGE_YESTERDAY_HL
Inp_Manual_Support
double
1950.00
Inp_Manual_Resistance
double
2000.00
Inp_RangeLookbackBars
int
24
looser than 48
Show all 40 inputs
Name
Type
Default
Description
Inp_MinRangePoints
double
400
width in points
Inp_ProximityATRmult
double
0.40
Inp_ExtraProximityPts
int
200
Inp_RequireBandTouch
bool
false
now soft
Inp_UseEngulfing
bool
false
Inp_ADX_Filter
double
18.0
moderate ADX
Inp_ADX_TF
ENUM_TIMEFRAMES
PERIOD_H1
compute on H1
Inp_UseEMASlopeFilter
bool
true
Inp_EMA_Period
int
200
Inp_EMA_SlopePtsMin
double
30
per-bar slope in points on H1
Inp_UseSessionFilter
bool
true
Inp_Session1_StartHour
int
22
22:00
Inp_Session1_EndHour
int
8
08:00 (wrap allowed)
Inp_Session2_Enable
bool
false
Inp_Session2_StartHour
int
12
optional second window
Inp_Session2_EndHour
int
16
Inp_Risk_Percent
double
0.05
0.05% per trade
Inp_Stop_ATR_mult
double
1.00
Inp_Stop_FixedPts
int
400
Inp_MinStopPoints
int
500
enforce broker + this
Inp_MarginSafety
double
0.85
use <=85% of free margin
Inp_MaxLots
double
0.30
hard cap
Inp_PartialCloseRatio
double
0.50
Inp_UseOppositeBandForTP
bool
true
Inp_MoveSL_to_BE_at_1R
bool
true
Inp_CooldownBars
int
8
Inp_Trade_Long
bool
true
Inp_Trade_Short
bool
true
How to install it
1Download the sourceUse "Download source (.zip)" above, or clone Zeeshan-Ahmad-Chaudhry/Gold-Strategies 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.
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 repository provides a collection of Expert Advisors for MetaTrader 5 and Python trading scripts developed for an educational YouTube series. It features various technical indicator-based strategies, including MACD, Relative Strength Index, Stochastic, and Bollinger Bands. The included MQL5 files implement multi-ti
MT5CollectionIndicator crossoverMean reversionTrend following
This collection features several expert advisors for the MetaTrader 5 platform, each built around a different technical indicator such as MACD, RSI, Parabolic SAR, and Ichimoku Kinko Hyo. The robots execute trades based on classic signal logic, including zero-line crossings and signal line crossovers. Users can configu
This repository contains a diverse collection of automated trading robots for the MetaTrader 5 platform. The strategies range from trend-following systems using True Strength Index (TSI) and Moving Average crossovers to mean-reversion tools utilizing Relative Strength Index (RSI) and Bollinger Bands. Most experts inclu
This educational collection provides a foundation for building MetaTrader 5 expert advisors through a series of modular code snippets and a primary RSI-based trading robot. The included expert advisor executes trades based on Relative Strength Index overbought and oversold levels, supporting both live and closed candle
MT5CollectionMean reversionIndicator crossoverTrend following
This repository provides a diverse collection of MetaTrader 5 expert advisors focusing on technical indicator automation. The core component aggregates signals from a wide array of standard tools, including trend-following moving averages, oscillators like RSI and MACD, and Bill Williams indicators. It includes specifi
This collection of MetaTrader 5 expert advisors focuses on order flow, microstructure, and scalping strategies. It includes tools for cumulative delta scalping, swing pivot fading, and bridging external signals from TradingView via file monitoring. The suite features robust risk controls such as daily loss and profit l
MT5CollectionScalpingMean reversionTrend following