SuperDCA Master 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. - Versione: 6.0
- Attivazioni: 5
DCA V6 SuperDCA Master
Confluence entries. ATR-spaced grid. Trailing basket take-profit.
DCA V6 SuperDCA Master is a multi-level grid Expert Advisor built for XAUUSDm (Gold) on the M5 timeframe. It opens a confluence-filtered base order and manages the whole basket as one unit - averaging in at ATR-spaced grid levels against a pullback, and closing the entire basket once a trailing profit target is reached. A crash-stop basket stop-loss and a hard equity-drawdown kill-switch protect capital on adverse swings.
Key Features
- H4/H1 Trend Confluence - entries only with price above a 200-period H4 EMA and a 50-period H1 EMA (buy setup) or below both (sell setup).
- RSI + Stochastic Timing - base order fires only when RSI(11, close) is oversold/overbought and the Stochastic %K crosses the %D at the same extreme - the momentum reversal point inside the trend.
- ATR-Spaced Grid Additions - up to InpMaxPositions total; each add-on placed at ATR x InpATRMultiplier from the last fill (min 200 points), with optional lot/spacing multipliers.
- Trailing Basket Take-Profit - once the basket is 450 points in profit from average price, a trailing lock of 60 points protects gains; the entire basket closes together (no partial exits).
- Basket Stop-Loss + Kill Switch - hard basket SL 5,500 points from base entry, max-equity-drawdown kill-switch, max-daily-loss and max-consecutive-loss pauses.
- Risk-Based Position Sizing - base lot sized from InpRiskPercent of balance vs the basket SL distance, capped by InpMaxLot.
- Discipline Filters - 15-bar cooldown between baskets, session filter, max-spread gate.
- MT5 Native - standard Trade library, no DLLs, no external dependencies.
Backtest Proof (Walk-Forward Validation, 2021-2026)
- Symbol: XAUUSDm | Timeframe: M5
- Binary SHA256: b10cf386 (DCA_V6_SuperDCA_Master_3275f1df.ex5)
- Out-of-Sample Profit Factor: 1.59 (2024-2026, 307 trades)
- Max Drawdown: 3.79%
- Recovery Factor: 2.05
- Trades Analysed: 629
- Net Result: +$831.26 (+8.31%)
- Win Rate: 79.65%
Recommended Settings (defaults)
| Parameter | Default | Description |
| InpRiskPercent | 0.40 | Risk per basket (% of balance) |
| InpMaxPositions | 2 | Max positions in grid |
| InpMaxEquityDrawdownPercent | 9.0 | Hard equity drawdown kill-switch |
| InpBasketTPPoints | 450 | Points profit from basket average to start trailing TP |
| InpBasketTrailStepPoints | 60 | Trail step pullback before closing basket |
| InpBasketSLPoints | 5500 | Basket stop-loss points from base entry |
| InpATRMultiplier | 1.9 | ATR grid spacing multiplier |
| InpLotMultiplier | 1.0 | Lot multiplier for subsequent grid orders |
| InpSpacingMultiplier | 1.0 | Spacing multiplier for subsequent levels |
| InpH4EMAPeriod | 200 | H4 EMA trend filter period |
| InpRSIPeriod | 11 | RSI period |
| InpStochK | 14 | Stochastic %K period |
| InpCooldownBars | 15 | Cooldown bars between new baskets |
| InpUseSessionFilter | true | Session filter (server hour 2-21) |
| InpMaxSpreadPoints | 500 | Max spread in points |
| InpMaxLot | 0.1 | Max lot per trade (broker volume limit) |
How It Works
- On each M5 bar, the trend filter checks price vs the H4 200-EMA and H1 50-EMA.
- The RSI + Stochastic confluence confirms entry (buy on oversold cross-up inside an uptrend; sell on overbought cross-down inside a downtrend).
- The base order is sized as a % of balance (InpRiskPercent) against the 5,500-point basket SL.
- If price moves against the basket, grid additions open at ATR-spaced levels (up to InpMaxPositions).
- When the basket is 450 points in profit, a trailing stop locks profit in 60-point steps; the whole basket closes together (or by basket SL / kill-switch).
- After a basket closes, a 15-bar cooldown pauses the signal engine.
Risk Disclaimer: Backtest metrics describe historical validation only and are not a guarantee of future results. Grid strategies average into losing positions and depend on the basket stop-loss and kill-switch for protection - always test on your broker's XAUUSDm contract specifications before live use. Trade responsibly.
