XAU Liquidity Retest EA
- Experts
-
Felipe Camargo Zamudio
Master Consultant in financial technology and risk analyst.
Work at DAFSYS, is a company of Development of automated financial systems. - Versione: 1.43
- Attivazioni: 5
XAU Liquidity Retest EA
XAU Liquidity Retest EA automates a deterministic liquidity-and-structure model for XAUUSD. It combines a trend filter, liquidity sweep, displacement, Order Block, optional FVG and retest confirmation before sending an order.
The EA manages each position in three stages: 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.
## 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, 1 April to 14 August 2026.
- History quality: 100% real ticks
- Processed ticks: 58,399,608
- Initial deposit: 10,000 USD
- Total net profit: 2137.47 USD
- Profit Factor: 2.37
- Maximum drawdown: 451.84 USD (3.78%)
The April start date is deliberate. 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
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 USD initial deposit is selected in Strategy Tester Settings and is not stored in the `.set` file. This is an aggressive test preset. A 0.5%–1.0% risk setting is more conservative.
## Installation
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. Load the desired preset.
5. Set `InpAllowTrading=true`.
6. Run a real-tick backtest and a demo test with your own broker before live use.
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
