XAU Liquidity Retest EA
17 Years of Algorithmic Trading Experience Built into an XAUUSD Strategy
XAU Liquidity Retest EA is not based on random entries or isolated indicator signals. It uses a deterministic strategy that analyzes market structure, liquidity sweeps, displacement, Order Blocks, and retests before validating an entry.
The EA manages each position in three stages: M15–M5–M3 multi-timeframe analysis, Selective entries based on SMC confluence, TP1, TP2 and a remaining runner toward TP3. It can move the stop to break-even after TP1 and apply ATR trailing after TP2. Hedging and netting accounts are supported; partial-close behavior depends on the broker's minimum volume and volume step.
The objective is not to trade constantly, but to wait for defined market structures and manage every position with clear rules.
""Introductory price!! Unit 112 (rear) — price will increase in stages by 25%.""
**Important**
For testing, use data from April 21, 2026 onwards. The bot is programmed to function from that date onwards.
Try adjusting the "Total Risk per position" variable to see its potential; it is currently set to 1.5 (moderate risk). Change it—try 2 or 2.5—and be amazed by the results... plus, the drawdown is impressively low—it will blow you away.
For testing, use data from April 21, 2026 onwards. The bot is programmed to function from that date onwards.
## Main features
- M15 trend bias using fast/slow EMA and swing structure.
- M5 liquidity sweep, displacement and Order Block detection.
- M3 confirmation and position management.
- Market-rejection or configurable Order Block limit entry.
- Three R-multiple targets with configurable partial exits.
- Equity-percent position sizing based on the actual stop distance.
- Limits for daily trades, consecutive losses, daily loss/profit, equity drawdown, spread and cooldown.
- Optional server-time session filter and MT5 economic-calendar news filter.
- A trade is skipped if the broker minimum lot would exceed the requested risk.
## Real-tick reference test
Reference environment: ICMarketsSC-Demo, XAUUSD M3, Every tick based on real ticks, 21 April to 14 August 2026.
- History quality: 100% real ticks
- Processed ticks: 58,399,608
- Initial deposit: 10,000 USD
- Total net profit: 8 801.00 USD
- Profit Factor: 3.37
- Maximum drawdown: 478.84 USD (4.3%)
The April start date is deliberate The robot was programmed to start working from that date. . In the IC Markets installation and server used for this validation, complete XAUUSD real-tick history was available from 1 April. Earlier months with incomplete history were not mixed into the displayed report. Other servers, accounts and symbol suffixes may provide different history, contract specifications and trading costs. IMPORTANT: Verify that your ticks are at 100% for the tests.
## Included 10,000 USD test preset default
The EA includes for default `XAU_Liquidity_Retest_10,000USD.set`: 1.5% risk, TP1 1.2R, TP2 1.75R, TP3 2.5R, 40%/30% partial exits, maximum 10 trades per day, three consecutive losses and a 20-minute cooldown.
The $10,000 deposit is configured in **Strategy Tester > Settings**; it is not saved within the `.set` file. This is an aggressive test preset. For more conservative exposure, `InpRiskPercent` can be adjusted—either reduced to 0.5–1.0% or increased to 2.0–2.5%—since the bot manages drawdown exceptionally well.
## Installation and backtesting
1. Install the product from MQL5 Market in MetaTrader 5.
2. Open XAUUSD M3 and download M15/M5/M3 history.
3. Enable Algo Trading.
4. Default preset. No need to adjust anything.
5. Set `InpAllowTrading=true`.
6. Run a real-tick backtest .
Leave `InpSymbol` empty to use the current chart symbol, including broker suffixes. On small volumes, TP1 or TP2 may not be divisible by the broker volume step; the EA preserves the remainder for TP3.
XAUUSD, gold, liquidity sweep, SMC, order block, displacement, retest, partial close, risk management, MT5