Collection · MT5

Gold Strategies

by Zeeshan-Ahmad-Chaudhry

This MetaTrader 5 collection provides specialized robots for trading XAUUSD, featuring a range-based mean reversion system and a trend-following expert advisor.

GitHub stars2
Forks1
Last update10 months ago5 Nov 2025
LicenceNone stated

Overview

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.

Details

Author

Zeeshan-Ahmad-Chaudhry on GitHub

Type

Collection

Platform

MetaTrader 5 (MQL5)

Strategy

Mean reversion, Trend following

Markets

Gold

Timeframes

M15-H1

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 XAU_RangeMeanReversion.mq5. Defaults are the author's; change them in the EA's Inputs tab.

NameTypeDefaultDescription
Inp_SymbolstringXAUUSDSymbol
Inp_TimeframeENUM_TIMEFRAMESPERIOD_M15Signal timeframe
Inp_RSI_Periodint14
Inp_RSI_Oversolddouble30.0
Inp_RSI_Overboughtdouble70.0
Inp_BB_Periodint20
Inp_BB_Devdouble2.0
Inp_ATR_Periodint14
Inp_Range_SourceRangeModeRANGE_YESTERDAY_HL
Inp_Manual_Supportdouble1950.00
Inp_Manual_Resistancedouble2000.00
Inp_RangeLookbackBarsint24looser than 48
Show all 40 inputs
NameTypeDefaultDescription
Inp_MinRangePointsdouble400width in points
Inp_ProximityATRmultdouble0.40
Inp_ExtraProximityPtsint200
Inp_RequireBandTouchboolfalsenow soft
Inp_UseEngulfingboolfalse
Inp_ADX_Filterdouble18.0moderate ADX
Inp_ADX_TFENUM_TIMEFRAMESPERIOD_H1compute on H1
Inp_UseEMASlopeFilterbooltrue
Inp_EMA_Periodint200
Inp_EMA_SlopePtsMindouble30per-bar slope in points on H1
Inp_UseSessionFilterbooltrue
Inp_Session1_StartHourint2222:00
Inp_Session1_EndHourint808:00 (wrap allowed)
Inp_Session2_Enableboolfalse
Inp_Session2_StartHourint12optional second window
Inp_Session2_EndHourint16
Inp_Risk_Percentdouble0.050.05% per trade
Inp_Stop_ATR_multdouble1.00
Inp_Stop_FixedPtsint400
Inp_MinStopPointsint500enforce broker + this
Inp_MarginSafetydouble0.85use <=85% of free margin
Inp_MaxLotsdouble0.30hard cap
Inp_PartialCloseRatiodouble0.50
Inp_UseOppositeBandForTPbooltrue
Inp_MoveSL_to_BE_at_1Rbooltrue
Inp_CooldownBarsint8
Inp_Trade_Longbooltrue
Inp_Trade_Shortbooltrue

How to install it

  1. 1Download the sourceUse "Download source (.zip)" above, or clone Zeeshan-Ahmad-Chaudhry/Gold-Strategies 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

140 stars

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

MT5 Collection Indicator crossoverMean reversionTrend following
Updated 3 years ago None stated GitHub repository of Kecoma Trading Collection
61 stars

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

MT5 Collection Indicator crossoverTrend followingMean reversion
Updated 6 years ago Custom licence GitHub repository of Pipbolt MT5 Expert Collection

NetAlgo EA Collection

by santiago-cruzlopez
55 stars

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

MT5 Collection Trend followingScalpingMartingale High risk
40 stars

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

MT5 Collection Mean 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

MT5 Collection Trend followingIndicator crossoverMulti-strategy

DaxAlgo Trading Strategies

by dhruuvsharma
9 stars

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

MT5 Collection ScalpingMean reversionTrend following

More collections

Need a broker for MT5?

Compare regulated brokers that support MetaTrader, with spreads, minimum deposits and leverage side by side.

Compare brokers