Quantum Gold Star
UTBot Divergence Filter EA is a professional-grade automated trading system that fuses two proven methodologies: UT Bot trailing stop signals for precise entry timing, and multi-indicator divergence analysis (adapted from LonesomeTheBlue's acclaimed Pine Script framework) to filter out low-probability trades before they happen.
The result: fewer trades, higher quality, smoother equity curve.
🔑 KEY PERFORMANCE (XAUUSD M15, Jan 2024 – Dec 2025, 100% Tick Quality)
| Metric | Value |
|---|---|
| Profit Factor | 1.35 |
| Sharpe Ratio | 4.98 |
| Recovery Factor | 1.33 |
| Max Drawdown | 11.42% |
| LR Correlation | 0.97 (ultra-smooth equity curve) |
| Total Trades | 245 (balanced long/short) |
| Expected Payoff | $7.63 per trade |
With optimized lot sizing and compounding, the strategy achieved 2.5× account growth over the 2-year test period — while keeping drawdown firmly under control.
⚙️ HOW IT WORKS
Step 1 — UT Bot Signal Generation The EA calculates an adaptive trailing stop based on ATR (Average True Range). When price crosses the trailing stop upward, a buy signal fires; when it crosses downward, a sell signal fires. Sensitivity is adjustable to match your preferred timeframe and volatility regime.
Step 2 — Divergence Confirmation Filter Before any trade is placed, the EA scans up to 10 technical indicators simultaneously for bullish or bearish divergence:
- MACD Line & Histogram
- RSI (Relative Strength Index)
- Stochastic Oscillator
- CCI (Commodity Channel Index)
- Momentum
- OBV (On-Balance Volume)
- Volume-Weighted MACD
- Chaikin Money Flow (CMF)
- Money Flow Index (MFI)
A trade only executes when the UT Bot signal and the required number of divergence confirmations align. This dual-layer filter eliminates a significant portion of false signals, especially during choppy or range-bound markets.
Step 3 — Intelligent Risk Management
- Fixed price-move TP/SL: Set take-profit and stop-loss in dollar price movement (e.g., $15 TP / $14 SL on XAUUSD) — intuitive and broker-friendly
- Time-based risk exit: Automatically closes positions still in loss after a configurable number of hours (default: 24h) — prevents "zombie" trades from consuming margin indefinitely
- Martingale recovery module (optional): After N consecutive losses, the EA enters a recovery cycle with progressive lot sizing until cumulative profit recovers the drawdown, then resets to base lot. Fully configurable multiplier, max level, and persistence across restarts
📊 WHY THIS EA STANDS OUT
- Institutional-grade signal quality — divergence filtering across 10 indicators is the kind of multi-factor confirmation professional desks use, not retail "one indicator" EAs
- Sharpe Ratio 4.98 — this is in the top percentile of published EA backtests; it means the return-per-unit-of-risk is exceptionally favorable
- 0.97 Linear Regression Correlation — the equity curve is near-perfectly linear, meaning consistent performance month after month, not a few lucky spikes
- Balanced long/short — 120 short trades (43.33% win) + 125 long trades (51.20% win), no directional bias
- Active across all sessions — trades during Asia, Europe, and US hours, adapting to global gold market dynamics
- Fully configurable — every parameter is exposed: indicator toggles, divergence sensitivity, pivot period, risk settings, martingale on/off — tailor it to your account size and risk appetite
🛡️ BUILT-IN SAFETY FEATURES
- Spread filter: Skips entry when spread exceeds your defined threshold — avoids slippage during news events
- One position per symbol: Prevents overexposure (configurable)
- Close opposite: Automatically closes the opposing position on signal reversal — no hedging confusion
- Margin pre-check: Before every trade, the EA verifies sufficient free margin; if the desired lot exceeds available margin, it reduces lot size or skips — never blows the account on a margin call
- Martingale state persistence: Recovery state survives EA restart and terminal crash — no orphaned recovery cycles
- New bar only trading: Eliminates intra-bar noise and reduces computational load
📋 RECOMMENDED SETTINGS
| Parameter | Recommended |
|---|---|
| Symbol | XAUUSD (Gold) |
| Timeframe | M15 |
| Minimum Deposit | $1,000 (0.01 lot) |
| Broker | ECN/STP with low gold spread (< 30 points) |
| UT Sensitivity | 1.0 |
| ATR Period | 10 |
| TP Price Move | $10($15 recomend) |
| SL Price Move | $8($14 recomend) |
| Divergence Indicators | All enabled |
