FillWick Champion EA
- Experts
-
Phan Van Khoa
Algorithmic trader and MQL5 developer based in Vietnam. I build Expert Advisors, indicators, and trading utilities — available on the MQL5 Market. Focused on automation, risk management, and practical trading solutions. - Version: 1.0
- Activations: 10
FillWick Champion EA — Statistical-Arbitrage Mean Reversion for XAUUSDm (Gold)
FillWick Champion EA is a statistical-arbitrage mean-reversion Expert Advisor engineered exclusively for XAUUSDm (Gold) on the M5 timeframe. Instead of chasing breakouts, it fades stretched price extremes whenever the market is in a range-bound regime — entering one isolated position at a time with strict ATR-based risk control on every single trade.
Why Mean Reversion on Gold M5?
Gold on M5 spends most of its time oscillating inside a trading range. Breakout EAs get chopped up by fake breakouts; trend EAs sit idle for long stretches. A mean-reversion engine profits from the market's most frequent behavior: price stretched too far from fair value snaps back. FillWick Champion measures that stretch objectively with Bollinger Bands, filters out strong-trend regimes with ADX, and only fades extremes with confirmation from RSI and candle shape.
How The Strategy Works
- 1 · Extreme Detection — 20-period Bollinger Bands at 3.5 standard deviations identify when price is statistically stretched. The EA buys on the lower band and sells on the upper band.
- 2 · Regime Filter — a 14-period ADX below 25 confirms the market is range-bound. In a strong trend (ADX > 25) the EA stands aside, because fading a trend is how mean-reversion EAs die.
- 3 · Confirmation — RSI (7) at 65 (overbought) / 35 (oversold) and a candle body ratio ≥ 0.50 confirm the extreme before a single tick is committed.
- 4 · Risk-First Exit — stop-loss at 2.5 × ATR, take-profit at 3.5 × ATR for a positive reward-to-risk profile, plus a trailing stop that locks in profit while giving price room to breathe.
Key Features
- Bollinger Band Extreme Fade — 20-period / 3.5σ bands detect stretched price; buys on the lower band, sells on the upper band.
- ADX Regime Filter — entries are blocked whenever the 14-period ADX is above 25, keeping the EA out of strong trends where fading is dangerous.
- ATR Dynamic Risk — stop-loss at 2.5 × ATR, take-profit at 3.5 × ATR, with an adaptive trailing stop that protects open profit.
- RSI + Body-Ratio Confirmation — dual confirmation filters out weak wick-only extremes before entry.
- Risk-Based Position Sizing — configurable risk per trade (default 1.0% of equity), with lot clamped to broker min/step/max and a free-margin check before every entry.
- Protection Filters — max daily loss circuit breaker (5.0%), max consecutive losses (3), session window filter (02:00–21:00 server time), spread guard (≤ 500 points), slippage cap (30 points).
- Broker-Safe Trailing — 30-second cooldown between trailing modifications, stops never moved into the broker stop/freeze zone, trailing skipped near the take-profit level.
- One Position At A Time — magic-number isolation (202607) so the EA never interferes with other robots or manual trades.
- MT5 Native — built on the standard CTrade library, no DLLs, no external dependencies.
Walk-Forward Validation — Why You Can Trust These Numbers
The strategy was developed on the in-sample window (2021–2023), then evaluated on a window that was never touched during optimization: the out-of-sample window (2024–2026). This is a true walk-forward test — the single best defense against curve-fitting. Backtests use every tick (Model 0) with 98% history quality on Gold XAUUSDm M5, 2021–2026.
| Window | Period | Profit Factor | Net Profit | Max Drawdown | Recovery Factor | Win Rate | Trades |
| Smoke | 2024 | 16.74 | +$442.21 | 1.78% | 2.44 | 80.00% | 5 |
| In-Sample | 2021–2023 | 1.08 | +$80.06 | 3.46% | 0.22 | 42.86% | 28 |
| Out-of-Sample | 2024–2026 | 3.56 | +$804.54 | 2.14% | 3.41 | 61.54% | 13 |
| Full | 2021–2026 | 1.66 | +$905.34 | 3.46% | 2.53 | 48.78% | 41 |
- Out-of-Sample Profit Factor 3.56 — the strongest period, confirming the strategy generalizes to data it has never seen.
- Full-window Profit Factor 1.66 across 41 trades, net +$905.34 (+9.05% on a $10,000 account).
- Max equity drawdown 3.46% — well inside the 5.0% gate threshold.
- G1–G7 release gate: ALL PASS — including OOS Profit Factor ≥ 1.20, Net Profit ≥ +5%, Max Drawdown ≤ 5%.
Risk Management & Position Sizing
- Risk per trade: 1.0% of account equity (InpRiskPercent).
- Max positions: 1 — no martingale, no grid, no averaging down.
- Stop-loss: 2.5 × ATR, clamped between 300 and 5000 points, placed beyond real market structure via a 15-bar swing search.
- Take-profit: 3.5 × ATR for a positive reward-to-risk ratio.
- Circuit breakers: 5.0% max daily loss, 3 max consecutive losses — the EA pauses before drawdown can compound.
- Free-margin check: positions are skipped when margin is unavailable.
Full Input Settings
Every parameter is exposed and documented — tune the EA to your own risk appetite.
| Parameter | Default | Description |
| InpRiskPercent | 1.0 | % of equity risked per trade |
| InpSLMultiplier | 2.5 | Stop-loss distance as an ATR multiple |
| InpTPMultiplier | 3.5 | Take-profit distance as an ATR multiple |
| InpMinSLPoints | 300 | Minimum stop-loss distance (points) |
| InpMaxSLPoints | 5000 | Maximum stop-loss distance (points) |
| InpMaxDailyLossPercent | 5.0 | Daily loss circuit breaker |
| InpMaxConsecLoss | 3 | Max losing streak before the EA pauses |
| InpMaxPositions | 1 | Max simultaneous positions |
| InpADXPeriod | 14 | ADX regime-filter period |
| InpADXThreshold | 25 | Max ADX allowed for entries (range regime only) |
| InpRSIPeriod | 7 | RSI period |
| InpRSIOverbought | 65 | RSI overbought level (short confirmation) |
| InpRSIOversold | 35 | RSI oversold level (long confirmation) |
| InpBodyRatio | 0.50 | Minimum candle body ratio for entry |
| InpCooldownBars | 10 | Bars between entries |
| InpTrailCooldownSec | 30 | Min seconds between trailing modifications |
| InpTrailStartMult | 1.0 | Trailing start as an ATR multiple |
| InpTrailDistMult | 1.5 | Trailing distance as an ATR multiple |
| InpTrailStepMult | 0.2 | Trailing step as an ATR multiple |
| InpUseSessionFilter | true | Enable session-window filter |
| InpSessionStartHour | 2 | Session start (server time) |
| InpSessionEndHour | 21 | Session end (server time) |
| InpMaxSpreadPoints | 500 | Spread guard — skip wide-spread bars |
| InpSlippage | 30 | Maximum slippage (points) |
| InpMagicNumber | 202607 | Magic number (position isolation) |
| InpTradeComment | FW_Champion | Trade comment |
Requirements
- Symbol: XAUUSDm (Gold)
- Timeframe: M5
- Platform: MetaTrader 5 (MT5), Hedged or Netting account
- Working hours: 02:00–21:00 server time (configurable)
- No DLLs, no external libraries, no martingale, no grid
Risk Disclaimer: Backtest metrics describe historical validation only and are not a guarantee of future results. Always test this Expert Advisor on your broker's XAUUSDm contract specifications (spread, swap, tick value) before using it on a live account. Review risk settings carefully. Trade responsibly.
