Trading robot · MT5

Sniper Divergence EA

by MuhammadHassanC

Sniper Divergence EA is a MetaTrader 5 trading robot that combines multi-timeframe RSI divergence detection with Support/Resistance and Supply/Demand zone validation.

GitHub stars1
Forks0
Last update8 months ago19 Feb 2026
LicenceNone stated

Overview

Sniper Divergence EA automatically scans higher timeframes from Daily down to M5 for regular and hidden RSI divergences, filtering setups near key price structure levels. Once validated, the expert advisor triggers trades on a lower entry timeframe such as M1. Risk management includes configurable fixed or ATR-based stop losses, balance percentage lot sizing, dynamic EMA-based take-profit management, and an automated break-even feature. Users can also select between fully automatic execution and manual signal mode.

Details

Author

MuhammadHassanC on GitHub

Type

Trading robot

Markets

Forex, 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.

Input Parameters

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

NameTypeDefaultDescription
TradingModeENUM_TRADING_MODEMODE_AUTOMATICTrading Mode
ShowDivergenceLinesbooltrueDraw Divergence Lines on Chart
ShowZonesbooltrueDraw S/R and S/D Zones on Chart
Scan_D1booltrueScan Daily for Divergence
Scan_H4booltrueScan H4 for Divergence
Scan_H1booltrueScan H1 for Divergence
Scan_M30booltrueScan M30 for Divergence
Scan_M15booltrueScan M15 for Divergence
Scan_M5booltrueScan M5 for Divergence
EntryTimeframeENUM_TIMEFRAMESPERIOD_M1Entry Confirmation Timeframe (M1 for Sniper)
EMA_Entry_Periodint9EMA for Entry Confirmation
EMA_TP_Periodint50EMA for Take Profit
Show all 40 inputs
NameTypeDefaultDescription
RSI_Periodint14RSI Period
RSI_AppliedPriceENUM_APPLIED_PRICEPRICE_CLOSERSI Applied Price
RSI_Overboughtdouble70.0RSI Overbought Level
RSI_Oversolddouble30.0RSI Oversold Level
RequireRSIExtremebooltrueRequire RSI in OB/OS Zone for Divergence
SwingStrengthint3Swing Detection Strength (left/right bars)
MaxBarsBackint100Max Bars to Look Back for Divergence
MinBarsBetweenint3Min Bars Between Swing Points
MaxBarsBetweenint50Max Bars Between Swing Points
DivergenceFilterENUM_DIVERGENCE_TYPEDIV_ALLDivergence Type Filter
MinRSIDivergencedouble2.0Minimum RSI Difference for Valid Divergence
MinPriceDivergencedouble0.0Minimum Price Difference (0 = auto by ATR)
ZoneFilterENUM_ZONE_TYPEZONE_BOTHZone Type Filter
SR_LookbackBarsint200S/R Lookback Period (bars)
SR_TouchCountint2Minimum Touches for Valid S/R Level
SR_ZoneWidth_ATRdouble0.5S/R Zone Width (ATR multiplier)
MaxDistanceFromZonedouble1.0Max Distance from Zone (ATR multiplier)
SD_ConsolidationBarsint5Min Consolidation Bars for S/D Zone
SD_ImpulseMoveATRdouble2.0Min Impulsive Move (ATR multiplier)
SD_LookbackBarsint100S/D Lookback Period (bars)
SD_ZoneWidthATRdouble0.3S/D Zone Width (ATR multiplier)
RequireTrendAlignmentboolfalseRequire Trend Alignment (Divergence is a reversal signal)
TrendEMA_Periodint50Trend EMA Period
TrendEMA_FastPeriodint20Fast EMA Period
EnableBreakEvenbooltrueEnable Break-Even at +10 Pips
BreakEvenPipsdouble10.0Pips to trigger Break-Even
StopLossTypeENUM_SL_TYPESL_ATR_BASEDStop Loss Type
FixedStopLossPipsdouble50.0Fixed Stop Loss (Pips)

How to Install It

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

Simba Sniper EA

by oriokie
6 stars

This MetaTrader 5 expert advisor focuses on XAUUSD using a multi-timeframe scalping approach based on Smart Money Concepts. It identifies institutional market structures by analyzing H4 trends, H1 supply and demand zones, and M5 entries. The logic incorporates order block detection, Fair Value Gaps (FVG), and liquidity

MT5 Trading robot SMC / ICT / price actionScalpingTrend following High risk
Updated 9 months ago Custom licence GitHub repository of Simba Sniper EA

ICT System EA

by 26730023-PhamPhuNguyenHung
5 stars

This MetaTrader 5 expert advisor automates trading strategies based on Inner Circle Trader (ICT) and Smart Money Concepts (SMC). It utilizes a confluence engine to evaluate market structure, PDA zones, fair value gaps, order blocks, and SMT divergence against correlated symbols like the DXY. Designed specifically for p

MT5 Trading robot SMC / ICT / price actionTrend followingMean reversion
Updated 7 months ago None stated GitHub repository of ICT System EA
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

Xauusd God MT5

by techly39
3 stars

This MetaTrader 5 expert advisor is designed specifically for trading gold (XAUUSD). The system utilizes a modular architecture to detect market regimes, identify ranges, and execute trades based on liquidity sweeps and breakouts. It incorporates several filters, including spread and volume checks, alongside a drawdown

MT5 Trading robot BreakoutSMC / ICT / price actionMean reversion
Updated 11 months ago None stated GitHub repository of Xauusd God MT5

EA SMC Engine

by Pauloeduspbr
3 stars

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

MT5 Trading robot SMC / ICT / price actionBreakoutTrend following
Updated 7 months ago MIT GitHub repository of EA SMC Engine

Fibonacci ICT EA

by Shifrozy
2 stars

Fibonacci ICT EA for MetaTrader 5 combines institutional price action concepts with Fibonacci retracement levels. It identifies higher timeframe trends and enters on pullbacks to specific golden zones using confirmations like Break of Structure and Fair Value Gaps. The system includes robust risk management such as per

MT5 Trading robot SMC / ICT / price actionIndicator crossoverMean reversion High risk
Updated 2 months ago None stated GitHub repository of Fibonacci ICT EA

More gold EAs

Related on ForexR

Need a Broker for MT5?

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

Compare MT5 brokers