FvgGold Fair Value Gap EA for XAUUSD
- 专家
- 版本: 2.0
Free open-source Expert Advisor for MetaTrader 5
FvgGold is a free, open-source Expert Advisor for trading Gold (XAUUSD) on MetaTrader 5. It uses institutional trading concepts — Fair Value Gaps (FVG), Order Blocks, and killzone sessions — to enter high-probability trades with a fixed risk-to-reward ratio.
Unlike most free EAs that use dangerous grid or martingale systems, FvgGold takes one quality trade at a time, scored and filtered by multiple confluence factors.
✨ Key Advantages
Filters weak setups — only trades that meet minimum score threshold
+20 score bonus when FVG overlaps institutional supply/demand zones
50/200 EMA crossover ensures trades align with higher timeframe bias
Only trades during peak liquidity windows (07:00–21:00 GMT)
Entry near FVG edge, SL beyond zone, TP at 1.5× risk distance
Daily loss limit, break-even at 0.5× ATR, max 1 concurrent trade
📊 Backtest Results
XAUUSD.m, M15 timeframe, 0.01 lot, starting balance $10,000
3-Month (Apr–Jul 2026)
6-Month (Jan–Jul 2026)
⚙️ Input Parameters
📌 FVG DetectionFVGTimeframe (M15) — Execution and FVG detection timeframe
MinGapSize (25) — Minimum FVG size in points
MaxAgeBars (20) — Maximum FVG age in bars
MinAgeBars (2) — Minimum FVG age in bars
FVGBuffer (3.0) — Buffer beyond FVG edge for SL (price units)
MinScoreFVG (50) — Minimum quality score to trade (0–100)
ScoreGapWeight (30) — Weight for gap size (0–30)
ScoreDispWeight (30) — Weight for displacement/candle strength (0–30)
ScoreHTFWeight (20) — Weight for H1 EMA alignment (0–20)
ScoreFreshWeight (10) — Weight for zone freshness (0–10)
ScorePDWeight (10) — Weight for premium/discount (0–10)
UseOBFilter (true) — Require Order Block confluence
OB_ImpulseATR (1.5) — Min impulse candle body = ATR × this value
OB_LookbackBars (50) — How far back to scan for OBs
OB_MinSize (10) — Minimum OB size in points
OB_ConfluenceBonus (20) — Score bonus for FVG + OB overlap
OB_MaxDistance (200) — Max distance between FVG and OB (points)
HTF_Period (H1) — Higher timeframe for trend filter
EMA_Fast (50) — Fast EMA period
EMA_Slow (200) — Slow EMA period
FixedLot (0.01) — Fixed lot size (0 = risk-based sizing)
RiskPercent (0.5) — Risk per trade as percentage
MaxTrades (1) — Maximum concurrent trades
DailyLossLimit (5.0) — Daily loss limit in USD (0 = off)
ATR_TP_Mult (2.0) — ATR multiplier for TP
RiskRewardRatio (1.5) — Fixed risk-to-reward ratio
UseFixedRR (true) — Use fixed R:R instead of ATR-based TP
UseKillzone (true) — Enable session filter
KZ_LondonStart (7) — London open start hour (GMT)
KZ_LondonEnd (10) — London open end hour (GMT)
KZ_OverlapStart (12) — Overlap start hour (GMT)
KZ_OverlapEnd (16) — Overlap end hour (GMT)
KZ_NYEnd (21) — NY session end hour (GMT)
KZ_PreferOverlap (true) — Only trade during overlap window
CloseAtEOD (false) — Close all positions at session end
MagicNumber (7777) — Unique magic number for this EA instance
SlippagePoints (20) — Maximum allowed slippage in points
🧠 Strategy Explained
Five-step process:
- Detect — Scans M15 for three-candle Fair Value Gap patterns
- Score — Rates each FVG 0–100 based on 5 quality components
- Confirm — Checks Order Block confluence (+20 bonus) and H1 EMA trend
- Filter — Only activates during London/NY killzone sessions
- Execute — Places limit order near FVG edge with fixed 1.5 R:R
📦 Requirements
- MetaTrader 5 (build 3000+)
- Broker with XAUUSD symbol
- Minimum balance: $10,000 (0.01 lot)
- Windows operating system
📄 License
MIT License — Free to use, modify, and distribute. Full source code included.
🔗 github.com/foeed/FvgGold-EA

