Algorithmic XAUUSD Expert Advisor for MetaTrader 5. Quality-scored FVG entries with Order Block confluence and London/NY killzone timing.
Every setup is scored on a 0-100 quality scale. Only the best FVGs with Order Block confluence are traded.
Each FVG is scored across 5 factors: gap size, displacement, HTF alignment, freshness, and premium/discount zone.
+20 score bonus when FVG overlaps an institutional Order Block. Filters out weak setups automatically.
H1 EMA 50/200 trend alignment. Only trades in the direction of the higher timeframe bias.
London open, NY overlap, and session end filters. Only trades during peak institutional activity windows.
Fixed R:R take-profit, daily loss limit, break-even management, and max trade caps protect your capital.
MIT License. Full MQL5 source code included. Modify, extend, or learn from it freely.
From detection to execution, every step is quality-controlled.
Scans M15 for three-candle imbalance patterns (Fair Value Gaps). Each gap is measured by size relative to ATR and filtered by minimum size threshold.
Every detected FVG is scored 0-100 across five weighted components: gap size, candle displacement, H1 EMA alignment, zone freshness, and premium/discount positioning.
The EA checks for nearby Order Blocks (institutional supply/demand zones). If an OB overlaps the FVG, the score jumps by +20 points.
Only activates during London open (07-10 GMT), London/NY overlap (12-16 GMT), or NY session (up to 21 GMT). Peak liquidity windows only.
Places a limit order near the FVG edge (not midpoint) with fixed 1.5 R:R. Moves to break-even at 0.5x ATR profit. Closes all at session end if enabled.
XAUUSD.m, M15, 0.01 lot, $10,000 starting balance.
| Period | Start | Final | Return | Win Rate | Trades |
|---|---|---|---|---|---|
| 3-Month (Apr – Jul) | $10,000 | $10,522 | +5.2% | 40.0% | 35 |
| 6-Month (Jan – Jul) | $10,000 | $14,874 | +48.7% | 45.3% | 64 |
Up and running in under 2 minutes.
Download FvgGold.mq5 from the repo and copy it to your MT5 Experts folder:
Open MetaTrader 5, press F4 to open MetaEditor. Open FvgGold.mq5 and press Compile (F7). Verify: 0 errors.
Open a XAUUSD M15 chart. Drag FvgGold from the Navigator. Enable Allow Algo Trading. Click OK.
In the EA inputs tab, click Load and select FvgGold.set for pre-optimized parameters.
All parameters are configurable. Defaults are optimized for XAUUSD M15.
Common questions about FvgGold.
MinGapSize and FVGBuffer for different instruments.Free, open-source, and ready to use. Download FvgGold and backtest it yourself.