GMM Liquidity Hunter
- Uzmanlar
- Sürüm: 1.0
- Etkinleştirmeler: 5
Statistical Liquidity Sweep Reversal EA for XAUUSD
Trade liquidity sweeps — not conventional swing levels.
GMM Liquidity GOLD Hunter is a fully automated Expert Advisor designed specifically for XAUUSD (Gold). Instead of relying solely on traditional swing-high/low detection,
the EA uses a Weighted Gaussian Mixture Model (GMM) with BIC-based cluster selection to statistically identify areas where wick extremes have concentrated over time.
The EA then waits for price to sweep through a detected liquidity zone and reject back inside it before considering a reversal entry.
How It Works
1. Statistical Liquidity Zone Detection
The EA collects wick extremes over a configurable rolling lookback period and weights observations according to wick length.
A Weighted EM Gaussian Mixture Model clusters these extremes into potential liquidity zones, while Bayesian Information Criterion (BIC) is used to select the appropriate number of clusters automatically.
No fixed number of zones needs to be manually specified.
2. Statistical Zone Merging
Nearby clusters can be merged according to configurable proximity criteria, helping reduce redundant or overlapping zones and producing cleaner liquidity areas.
3. Liquidity Sweep Confirmation
A potential trade is triggered only when price:
-
breaches a detected liquidity zone, and
-
subsequently closes back inside the zone.
This is designed to distinguish a sweep-and-rejection setup from a straightforward breakout.
4. Momentum Filter
The EA can reject sweep signals when the breach candle's body is excessively large relative to ATR.
The objective is to filter out situations where strong directional momentum suggests a genuine breakout rather than a rejection of liquidity.
5. Zone Invalidation
Zones are automatically retired after a configurable number of closes beyond the zone.
Once the market demonstrates sustained acceptance beyond a level, the EA stops treating that level as a potential reversal area.
6.Input Setup
- 🔧Default Setup
Key Features
-
Weighted Gaussian Mixture Model (GMM) liquidity detection
-
BIC-based automatic cluster selection
-
Wick-length weighting
-
Statistical zone merging
-
Configurable sweep/close confirmation
-
Configurable momentum filter
-
Configurable zone invalidation
-
ATR-based maximum stop-loss distance
-
Risk-percent or fixed-lot position sizing
-
Optional break-even management
-
Configurable break-even trigger and lock distance
-
Automatic weekend position closure
-
Custom Strategy Tester optimization score:
Net Profit / Maximum Drawdown % -
Extensive user-configurable parameters
Designed for XAUUSD
Recommended configuration:
-
Symbol: XAUUSD
-
Timeframe: H1
-
Account: ECN / Raw Spread preferred
-
VPS: Recommended for uninterrupted automated operation
Backtest Reference
An example XAUUSD H1 backtest over approximately 8 months produced:
| Metric | Result |
|---|---|
| Profit Factor | 2.26 |
| Recovery Factor | 4.23 |
| Maximum Equity Drawdown | 21.19% |
| Total Trades | 67 |
These figures are provided for informational purposes only and represent a limited historical test. Results can vary significantly depending on broker, spread, execution, modelling quality, commission, market conditions, and parameter settings.
Risk Disclaimer
Past performance does not guarantee future results.
Trading leveraged financial instruments involves substantial risk, and losses can exceed expectations. No Expert Advisor or trading strategy can guarantee profits.
The EA has been tested on a limited historical sample. Before using it with real funds, forward-test it on a demo account and evaluate its behaviour under your broker's execution conditions.
Use position sizing appropriate for your risk tolerance and financial circumstances. Never risk capital you cannot afford to lose.
Questions?
If you have questions about the EA or any of its parameters, feel free to get in touch. I'm happy to explain how the statistical liquidity detection, sweep confirmation, risk management, and optimization settings work.

