Fvg Gold Master
- Experts
- Versione: 1.0
- Attivazioni: 5
FVG Gold Master is a dedicated Expert Advisor built exclusively for XAUUSD (Gold) on the M15 timeframe. It combines institutional 3-candle Fair Value Gap (FVG) price action with higher-timeframe trend alignment, market structure filtering, volatility gating, and automated capital protection designed for both standard accounts and proprietary trading firm evaluations.
Every position opens with a hard Stop Loss and Take Profit calculated from market structure and ATR volatility. The Expert Advisor does not use Martingale, Grid, or loss-averaging techniques.
Official Preset Files and Setup Guide
Ready-to-load preset files (.set) for Conservative Prop-Firm (1.0% risk), Balanced Growth (2.0% risk), and Small Account (1,000 USD) profiles are available in the official MQL5 Blog post:
Recommended Requirements
- Symbol: XAUUSD / GOLD only (broker suffixes such as XAUUSDm, XAUUSD.pro, or XAUUSD.raw are detected automatically)
- Timeframe: M15
- Account Type: Hedging or Netting (low-spread ECN or Raw accounts recommended)
- Minimum Recommended Deposit: 1,000 USD (5,000 USD or higher recommended for full partial-close lot splitting on standard Gold contracts)
- Leverage: 1:25 to 1:500 (built-in free-margin check adapts lot size automatically)
- Hosting: 24/5 MetaTrader 5 VPS recommended so trade management and protection monitors remain active continuously
Core Trading Logic
- Institutional Fair Value Gap Detection: Identifies 3-candle displacement imbalances validated by middle-candle body strength and minimum gap size, entering on controlled retracements into the zone.
- Multi-Layer Confirmation: Aligns entries with H1 EMA trend direction, Market Structure Shift (MSS), RSI, Momentum, and an ADX climax ceiling.
- Auto-Regime Filtering: Automatically activates Premium/Discount zone filtering during low-ADX ranging markets while permitting trend-continuation entries in directional markets.
- Volatility Percentile Gate: Compares current ATR against a rolling lookback window to avoid low-liquidity consolidation periods.
Capital Protection and Prop-Firm Controls
- Universal Balance Auto-Scaling: Default percentage-of-balance sizing (LotMode = 1, RiskPercent = 1.0%, InpAutoScaleUSDByRisk = true) automatically scales lot sizes, Daily Profit Target, TP Extender, and Breakeven Buffer across account sizes from 1,000 USD to 200,000 USD and above.
- High-Water Mark Drawdown Throttle: Monitors rolling peak balance and automatically reduces per-trade risk when drawdown reaches the configured threshold, restoring normal risk upon recovery.
- Daily Loss Limit and Profit Targets: Built-in daily equity loss brake (default 3.0%) with optional automatic position closure, plus configurable Daily and Monthly Profit Targets.
- Active Trade Management: Includes Partial Close with Breakeven protection (with automatic Breakeven fallback on small 0.01-0.02 lot positions), TP Extender, Partial Loss-Cut on adverse moves, and closed-bar Market Structure Shift early profit protection.
- Session and Close Protection: Per-weekday trading hours with automatic live broker GMT offset detection (TH_ServerOffsetMode = AUTO), consecutive-loss cooldown, opposite-direction flip guard, optional economic news filter, and pre-market-close protection.
Beginner Guide: How to Install and Attach to a Chart
If this is your first time installing an Expert Advisor in MetaTrader 5, follow these exact steps:
1. Download from MQL5 Market: Open MetaTrader 5, log in to your MQL5 account (Tools -> Options -> Community), open the Navigator panel (Ctrl+N), go to Market -> Purchases, and click Install next to FVG Gold Master.
2. Enable Automated Trading Globally: Click the Algo Trading button on the top MetaTrader 5 toolbar so its icon turns green. Also open Tools -> Options -> Expert Advisors and verify that "Allow algorithmic trading" is checked.
3. Open the Correct Chart: Open Market Watch (Ctrl+M), find your broker's Gold symbol (such as XAUUSD, XAUUSDm, or GOLD), right-click it, and choose Chart Window.
4. Set the Timeframe to M15: Click M15 on the timeframe toolbar. FVG Gold Master is calibrated specifically for XAUUSD M15.
5. Attach the Expert Advisor: In the Navigator panel under Expert Advisors -> Market, drag FVG Gold Master onto the XAUUSD M15 chart (or double-click it).
6. Check Permissions (Common Tab): In the pop-up window, open the Common tab and ensure "Allow Algo Trading" is checked.
7. Configure Risk or Load a Preset (Inputs Tab): Open the Inputs tab. The default settings are already calibrated for 1.0% prop-safe risk. To use another risk profile, either edit RiskPercent directly or click Load to select a .set file downloaded from the official preset blog post above. Click OK to start.
8. Confirm It Is Running: Verify that the small hat icon in the top-right corner of the chart is blue (active) and that the on-chart FVG Gold Master dashboard is visible.
How to Load a Preset (.set) File
1. Download the preset archive from https://www.mql5.com/en/blogs/post/781578 and extract the .set files.
2. In MetaTrader 5, click File -> Open Data Folder, then open MQL5 -> Presets.
3. Copy the extracted .set files into the Presets folder.
4. Double-click the blue icon in the top-right corner of your XAUUSD M15 chart (or press F7), open the Inputs tab, click Load, choose your preset file, and click OK.
How to Use FVG Gold Master Safely
- Start on a Demo Account First: Always run the Expert Advisor on a demo account with your exact broker for at least 1 to 2 weeks to observe spreads, execution speed, and lot sizing before deploying live capital or starting a prop-firm challenge.
- Match Risk to Your Account Rules:
- Prop-Firm Challenges (4-5% daily DD / 8-10% total DD): Keep RiskPercent at 0.5% to 1.0% and DailyLossPercent at 2.5% to 3.0%.
- Personal Standard Accounts (5,000 USD+): Use 1.0% to 2.0% depending on your personal drawdown tolerance.
- Small Accounts (1,000 USD): Load the SmallAccount_1000USD preset (1.5% risk) or use a Cent/Micro account so partial-close lot splitting operates cleanly.
- Keep MetaTrader 5 Running 24/5: Partial Close, Breakeven, Partial Loss-Cut, Daily Loss Limit, and Pre-Close protection run actively inside MetaTrader 5. Do not close the terminal or put your PC to sleep while trades are open; use a reliable VPS for uninterrupted monitoring.
- Avoid Manual Interference: Let the Expert Advisor manage open positions to completion. Manually closing or moving stops can conflict with partial-close tracking.
- Use Unique Magic Numbers: If you run other Expert Advisors on the same account, verify that each EA has a unique MagicNumber (default 750083) so trades never interfere with one another.
- Keep Live Timezone on AUTO: On live and demo charts, leave TH_ServerOffsetMode set to AUTO so trading hours automatically synchronize with your broker's server time and Daylight Saving shifts.
- Check Spread and Major News: Gold spreads widen around major US releases (such as CPI, NFP, and FOMC) and during daily market rollover. Use low-spread ECN accounts and consider pausing new entries or enabling the optional news filter during extreme macro events.
Key Input Groups
1. FVG Detection and Entry Mode: Bar-close or real-time entry, retracement entry level percentage (default 25%), gap tolerance, zone expiration, and post-trade cooldowns.
2. Confirmation and Auto-Regime: Auto-Regime ADX threshold, impulse body percentage, H1 EMA filter, MSS pivot period, RSI, Momentum, and ADX ceiling.
3. Stop Loss and Take Profit: ATR-based Stop Loss multiplier and Risk-to-Reward ratio (default 1:2.8).
4. Partial Close, TP Extender, and Loss-Cut: Trigger percentages, close percentages, Breakeven buffer, optional runner trailing stop, and loss-side partial reduction.
5. Risk and Drawdown Controls: LotMode (percentage of balance, fixed USD risk, or fixed lot), RiskPercent, auto-scaling switch, HWM Drawdown Throttle, Daily Loss Limit, Daily Profit Target, and Monthly Profit Target.
6. Schedule and Protections: User timezone offset, automatic or manual broker GMT offset, per-weekday active hours, pre-close protection, and optional CSV trade logging (saved to MT5 Common\Files).
7. Display: Clean on-chart statistics dashboard and optional FVG zone visualization.
Backtesting Notes (Strategy Tester)
- Symbol and Timeframe: Test on XAUUSD, M15 timeframe, using "Every tick" or "Every tick based on real ticks".
- Server GMT Offset: In Strategy Tester, set TH_ServerGMTOffset to match your historical broker's server GMT offset (default 0.0 for GMT+0 data; use 2.0 or 3.0 for GMT+2/+3 brokers).
- Auto-Scaling: Keep LotMode = 1 and InpAutoScaleUSDByRisk = true to test consistent scaling across 1,000 USD, 5,000 USD, 50,000 USD, or 100,000 USD deposits.
Quick Troubleshooting for First-Time Users
- No trades opening immediately: This is normal. The EA waits for confirmed M15 Fair Value Gap setups inside active trading hours (Monday, Wednesday, and Friday sessions by default) that pass all trend, structure, and volatility filters.
- Gray hat icon on chart: Algo Trading is disabled. Enable the green Algo Trading button in the top toolbar and check "Allow Algo Trading" in the EA's Common tab.
- "Built exclusively for XAUUSD" message on chart: You attached the EA to a non-Gold symbol. Move it onto an XAUUSD / GOLD M15 chart.
- Optional News Filter note: UseNewsBlock is OFF by default. If you enable it with your own Finnhub API key, add finnhub.io under Tools -> Options -> Expert Advisors -> Allow WebRequest for listed URL.
Risk Disclaimer: Trading leveraged financial instruments such as XAUUSD involves substantial risk of loss and may not be suitable for all investors. Historical backtest simulations and past performance do not guarantee future results. Always verify behavior on a demo account with your broker before live deployment.
