XAU Accumulator
- Experts
-
Francisco Miguel Campos Rueda
Independent MQL5 developer, specialized in trading systems for gold (XAUUSD). XAU Accumulator was developed and backtested across multiple market cycles before being published on the Market. Questions and feedback are always welcome. - Version: 1.18
- Activations: 5
XAU Accumulator — dip-aware position accumulation for XAUUSD. You always decide when to take profit.
WHAT XAU ACCUMULATOR DOES
XAU Accumulator is a position-accumulation Expert Advisor for XAUUSD. It only opens BUY positions, based on price relative to a 30-day Simple Moving Average (SMA30):
- Price 1.5% or more below the SMA30: buys a larger lot size (dip entry).
- Price between -1.5% and +3.0% of the SMA30: buys a standard lot size (base entry).
- Price 3.0% or more above the SMA30: does not buy that cycle.
By default the strategy evaluates once per week. An optional setting allows daily evaluation instead.
This EA never closes a position to take profit. Floating profit is left to run without any built-in target — deciding when to close a position for profit is always the trader's manual decision, never the EA's. This is a deliberate design choice: the strategy does not cap upside, and no buyer should expect the EA to "lock in" gains automatically.
Automatic closes exist only as last-resort safety nets, never to take profit:
1. Emergency margin stop — if the account margin level drops to a critical threshold (150% by default, configurable), the EA closes all of its positions and pauses itself until manually reviewed.
2. Basket stop-loss — if the floating loss across all of the EA's open positions reaches 25% of the account's total balance (configurable), the EA closes all of its positions to stop the drawdown there. Unlike the emergency stop, the EA does not pause afterward — it resumes buying normally on the next cycle. This gives the strategy roughly four such loss-cycles before the account balance would be fully consumed, instead of one uncontrolled drawdown.
RISK DISCLOSURE — PLEASE READ BEFORE PURCHASING
This strategy does not use a per-trade stop-loss. It accumulates positions over time and is designed to hold through drawdowns rather than exit them. In historical testing, the maximum floating (equity) drawdown reached 71.82% of account equity at one point, even though the strategy recovered and went on to a large net profit over the full test period. This kind of swing is expected with this approach and must be something you are personally comfortable with before using real capital. Past results do not guarantee future performance.
We are intentionally transparent about this mechanism rather than hiding it — if unlimited accumulation without a per-trade stop-loss is not a risk profile you want, this EA is not right for your account.
RECOMMENDED SETUP
- Symbol: XAUUSD (standard account)
- Minimum recommended starting balance: $20,000 (based on the historical test below with default lot sizes)
- Leverage: 1:100 or higher
- Timeframe: any (the EA evaluates by calendar day/week internally, independent of chart timeframe)
- Compatible with cent/micro accounts as well — contract sizes for XAUUSD on cent accounts vary by broker, so adjust the lot size inputs (InpLotsDip / InpLotsBase) proportionally to match your broker's contract size before going live. The historical results below were produced on a standard account and are not a like-for-like preview of cent-account performance.
HISTORICAL TEST RESULTS
- Symbol: XAUUSD-VIP, H1 data
- Period tested: approximately 14,800 hourly bars (about 1.7 years), 98% modeling quality
- Initial deposit: $20,000
- Total net profit: +$65,316.70 (+326.6%)
- Gross profit: +$70,628.94 / Gross loss: -$5,312.24
- Maximum balance drawdown: $5,278.76 (23.87%)
- Maximum equity drawdown: $119,641.26 (71.82%)
KEY INPUTS
- InpLotsDip / InpLotsBase — lot size for dip / base entries (default 0.01)
- InpEnableBasketStopLossV2 / InpBasketStopLossPct — basket-level loss protection (default: on, 25%)
- InpEnableEmergencyStop / InpEmergencyMarginLevelPct — account-level emergency stop (default: on, 150%)
- InpEvalEveryTickV1 — evaluate daily instead of weekly (default: off)
No repainting, no martingale multiplier on losing trades, no grid recovery logic — this is a straightforward SMA-distance-based accumulator.

