Collection · MT5

XauAI Sniper

by shawnwong84

XauAI Sniper is a MetaTrader 5 expert advisor designed specifically for trading gold (XAUUSD) on M10 and M5 chart snapshots.

High risk

GitHub stars1
Forks0
Last update4 months ago26 Jul 2026
LicenceNone stated

Overview

XauAI Sniper evaluates closed-bar price structure, EMA indicators, pullbacks, and reversal exhaustion thresholds, using an optional external AI filter to score or block candidate entries. Trade management includes R-based exit management, coordinated basket closures for pyramid add-on positions, balance-based or stop-loss risk lot sizing, and tiered equity protection gates. Notable limits include license PIN gating, disabled daily loss locks by default, and a minimal README focused on backend release mechanics.

Details

Input Parameters

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

NameTypeDefaultDescription
InpLicensePINstring
InpAccountModeENUM_ACCT_MODEACCT_BALANCEDv5.8.4: original default risk preset for demo/cloud testing
InpTradeModeENUM_XAU_TRADE_MODEBALANCED_MODESAFE=stricter blocks, BALANCED=context-aware, AGGRESSIVE=allow clean B/continuation warnings
InpAdaptiveTransitionModeENUM_ADAPTIVE_TRANSITION_MODEADAPTIVE_TRANSITION_ACTIVEtransition context/management remains active
InpAllowAdaptiveReversalDirectEntryboolfalsev6.25.22: OFF by default after 30-day evidence; canonical M10 may still originate the direction
InpAdaptiveTransitionPresetIdstringXAUUSD_AI_Sniper_EA_v6.24.1_ACTIVE.setdeployment identity; chart/preset must preserve this exact production marker
InpTransitionPersistenceBarsint3closed M5 bars required before a directional lifecycle transition becomes authoritative
InpTransitionMatureThresholddouble60.0
InpTransitionExhaustThresholddouble70.0invariant: >=70 blocks every old-direction autonomous entry source
InpTransitionProbabilityThresholddouble57.0
InpTransitionReversalThresholddouble68.0
InpTransitionMinRewardRdouble1.20
Show all 40 inputs
NameTypeDefaultDescription
InpTransitionPreferredOppositeAtdouble80.0compact local reversal package may approve before HTF flips
InpTransitionFastConfirmSecondsint30dedicated high-exhaustion reversal confirmation, closed-bar/microstructure proven and anti-chase guarded
InpTransitionOldConfidenceCapdouble35.0successful opposite counter evidence during high exhaustion caps old confidence
InpTransitionCounterDecayMinutesint120successful counter evidence fades; it cannot remain permanently bullish/bearish
InpTransitionActiveExitAuthoritybooltruewhen ACTIVE, R manager remains sole broker-close owner and consumes transition recommendations
InpTransitionMaxOriginExtensionATRdouble2.00first reversal leg beyond this is consumed; wait for value reset instead of chasing
InpTransitionMaxValueDistanceATRdouble1.00correct direction is not enough when price is too far from local value
InpTransitionMaxConsumedPctdouble70.0percentage of origin-to-next-obstacle leg already consumed
InpTransitionPullbackResetATRdouble0.75evidence-based pullback from impulse peak required before same-opportunity re-entry
InpTransitionEvidenceWindowBarsint12bounded closed-M5 sequence: reclaim/retest/displacement may arrive on separate bars
InpTransitionOpportunityMaxBarsint36stale reversal watches expire; exhaustion authority remains until market reset
InpAIModeENUM_XAU_AI_MODEAI_FILTER_ONLYOFF=no AI calls | ADVISOR=AI logs an opinion only, never blocks/resizes | FILTER=AI may still block/reduce a weak-confid
InpJune18RestoreModeboolfalseTRUE: forces AI_ADVISOR_ONLY, keeps grade-only soft-bypass and no-limit daily locks off regardless of other settings, re
InpLotSizingModeENUM_XAU_LOT_SIZING_MODEJUNE_16_19_BALANCE_MODEJUNE mode restores balance-based lots; REAL mode uses OrderCalcProfit SL risk
InpJuneBalanceLotPer1000double0.070$3k A trade ≈0.21 before broker/margin/maxlot; B≈0.15, A+≈0.26
InpNoLimitTradingModebooltrueTRUE = no daily/profit/growth lock force-close, no daily pause, no cooldown stop-for-day
InpDisableAllDailyLocksbooltrueAlias/master override: bypass Daily Growth Lock, daily profit lock, retain-percent giveback locks
InpNoDailyLimitModebooltrueAlias/master override: bypass daily/weekly target/loss stop logic and daily pause logic
InpProfitGuardianboolfalsev5.1.3: DEFAULT OFF — tier risk-cuts + HTF trend lock + cooldown OFF (restores v4.9.7 aggression)
InpProfitLockbooltruev5.1.3: ALWAYS-ON safety net — runs INDEPENDENTLY of InpProfitGuardian
InpEPF_Enablebooltruemaster switch — set false to disable all EPF behavior
InpEPF_DailyT1Pctdouble5.0daily +5%: mild defense
InpEPF_DailyT2Pctdouble10.0daily +10%: moderate defense
InpEPF_DailyT3Pctdouble15.0daily +15%: capital preservation
InpEPF_DailyT4Pctdouble20.0daily +20%: ultra-defensive lockdown
InpEPF_PeakRetracePctdouble6.0% retrace from intraday peak (after >=5% peak) = jump 1 tier up
InpEPF_PeakMinPctdouble5.0ignore retrace gate until daily peak >= this %
InpEPF_ConsecLossWarnint3after N consecutive losses → bump 1 tier

How to Install It

  1. 1Download the sourceUse "Download source (.zip)" above, or clone shawnwong84/XauAI-Sniper 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, and any .mqh files into the Include folder the code expects.
  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

KolaTradebot SMC

by Sidoine1991
4 stars

KolaTradebot is a MetaTrader 5 expert advisor that executes a multi-asset strategy using Smart Money Concepts and a Global Order Model. It bridges the platform with a Python-based server to analyze market structures like order blocks, fair value gaps, and liquidity sweeps across multiple timeframes. The system includes

MT5 Collection SMC / ICT / price actionAI / machine learningBreakout High risk

Oslib MT5 Collection

by marcoc68
2 stars

Oslib is an extensive repository of Expert Advisors and indicators for MetaTrader 5, encompassing various quantitative trading approaches. The collection includes statistical arbitrage robots that trade spreads between two correlated symbols, machine learning experts utilizing Support Vector Machines (SVM), and high-fr

MT5 Collection ArbitrageAI / machine learningMean reversion High risk
Updated 1 year ago GPL-3.0 GitHub repository of Oslib MT5 Collection

CodexBot Collection

by hungnm2527
1 stars

This MetaTrader 5 repository provides a collection of expert advisors, including a specialized mean-reversion system for gold and silver. The primary strategy identifies liquidity sweeps of the first trading hour to time entries, utilizing multi-timeframe filters like ADX and candle wick ratios. It manages risk through

MT5 Collection Mean reversionSMC / ICT / price actionMartingale High risk
Updated 8 months ago None stated GitHub repository of CodexBot Collection
1 stars

This repository contains two expert advisors for MetaTrader 5: a reconstruction of a popular grid system and a price-action tool for gold. The primary EA utilizes RSI and price extremes for entry signals, managing trades through a grid with tiered lot multipliers. It features smart distance calculations using ATR ratio

MT5 Collection Mean reversionGridMartingale High risk

Xau Cloud AI Sniper

by Lamarrsdrip
1 stars

Xau Cloud AI Sniper is an automated trading robot for MetaTrader 5 designed for gold trading. It utilizes a multi-layered entry pipeline involving a pattern engine, breakout detection, and trend alignment, often synchronized with external cloud-based market outlooks. The system features an AI-filter mode to validate tr

MT5 Collection BreakoutTrend followingMean reversion High risk
Updated 8 weeks ago None stated GitHub repository of Xau Cloud AI Sniper

NeoFL EA Collection

by neofinn
1 stars

NeoFL is a collection of modular MetaTrader 5 trading robots built on a shared algorithmic architecture. The library includes specialized engines for gold, forex, and candle level revisits. The primary Candle Revisit EA uses M5 price action analysis for entries while employing an M1 observer for trade protection. It ma

MT5 Collection SMC / ICT / price actionMartingaleMean reversion High risk
Updated 3 months ago None stated GitHub repository of NeoFL EA Collection

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