Full MQL5 Source Code – XAUUSD (Gold) Expert Advisor for MetaTrader 5
This is the complete, editable MQL5 source code of Gold Whale Empire, the gold-only XAUUSD M15 Expert Advisor. Study it, customise it, rebrand it, or build on top of it. It compiles in MetaEditor with 0 errors using the standard MT5 libraries, no DLLs and no external dependencies.
What You Get
- Gold Whale Empire.mq5 – the full main Expert Advisor source
- 13 module includes (.mqh) – NeonPanel, TrendCompass, GoldCandleSkin, ParticleField, CandleGlow, WhaleWatermark, MarketTicker, EmpireProfile, SupportResistance, SessionInfoTicker, SignalMonitor, DXYFilter, NewsAlert
- gwe_whale_1024.bmp – the on-chart watermark image
- README – build instructions
No license lock, no time bomb, no obfuscation. Clean, readable MQL5 you fully own. Prefer the ready-to-run compiled version instead? Get it cheaper on binaryforexea.com.
Technical Specifications
- Pair: XAUUSD (Gold), single pair
- Timeframe: M15 only
- Platform: MetaTrader 5
- Account: ECN / Raw Spread (low spread)
- Minimum deposit: $2,000 recommended
- Leverage: 1:100 minimum, 1:500 recommended
Performance – 1 Year Backtest
XAUUSD M15, January 2025 to January 2026, $2,000 starting capital, every tick with real spreads on an ECN account.
| Metric | Safe | Balanced | Aggressive |
|---|---|---|---|
| Net Profit | +191% | +596% | +2,429% |
| Win Rate | 89.05% | 92.08% | 93.95% |
| Profit Factor | 1.40 | 1.34 | 1.28 |
| Max Drawdown | 9.71% | 19.22% | 31.86% |
| Sharpe Ratio | 6.58 | 6.12 | 5.83 |
| Total Trades | 1,479 | 2,046 | 2,677 |
How It Works
12-Layer Signal Filtering. Every entry must pass a composite filter combining multi-timeframe EMA trend alignment, ADX strength, RSI momentum, H4 confirmation, session context and USD (DXY) correlation.
Intelligent Exit System. Progressive partial closes lock profit, a dynamic trailing stop protects gains after the first partial, and a daily profit target closes everything on exceptional days. No martingale, no grid, stop loss on every trade.
Compile & Edit
- Copy all .mq5 and .mqh files into MQL5Experts (File -> Open Data Folder in MT5).
- Copy gwe_whale_1024.bmp into MQL5Images.
- Open Gold Whale Empire.mq5 in MetaEditor and press F7. It compiles with 0 errors using the standard MT5 libraries.
Risk warning: Trading forex, CFDs and gold involves a high level of risk and may not be suitable for all investors. Past performance does not guarantee future results. Backtest results come from historical data; live conditions may differ. Always test on a demo account first and never risk money you cannot afford to lose.
Full Documentation: binaryforexea.com/goldwhaleempire.html
Getting Started Guide: binaryforexea.com/goldwhaleempire-guide.html





















