Gold Continuation
- Experts
-
Arno Olivier
I specialize in developing high-performance trading solutions tailored for Forex and high-volatility Synthetic Indices. My expertise includes creating custom MetaTrader 5 Expert Advisors (EAs), tailored indicators, and seamless VPS deployments to ensure low-latency execution. As an active MQL5 AI - Version: 1.2
- Activations: 5
GoldContinuationEA — with Positive-P&L Continuation
Overview
GoldContinuationEA is a fully automated algorithmic trading system built for MetaTrader 5. It trades breakouts of the Envelopes channel using full-bodied candles and manages trades as a single basket with an averaged entry price, a basket take-profit target and trailing stop protection. The system is designed primarily for GOLD (XAUUSD) on M1/M5/M15/H1, and can also be used on other symbols and timeframes.
1. Entry Logic (Signals)
The EA uses the standard Envelopes indicator together with a strict full-body candle filter:
- A candle must be "full-bodied": the body must be at least 70% of the candle range (adjustable), and the body size must be at least a minimum number of points.
- Bullish signal: a full-bodied bullish candle closes in or above the upper Envelopes band → a BUY basket is opened.
- Bearish signal: a full-bodied bearish candle closes on or below the lower Envelopes band → a SELL basket is opened.
- Signals are evaluated on the closed bar only (no repainting of completed signals, no intra-bar entries).
- Default settings: Envelopes MA period 5, deviation 0.05%, applied to close price (SMA).
2. Continuation (Pyramiding) — Positive P&L Only
GoldContinuationEA adds to a winning basket — never to a losing one:
- A new order in the same direction is opened only when the whole basket is in positive P&L and price has moved a configured distance further in the direction of the trade.
- There are NO retrace / averaging / grid entries. Losing positions are never averaged.
- Lot size for each continuation level grows by an optional multiplier; the number of continuation orders is capped.
- On netting accounts (one position per symbol) the EA automatically switches to single-entry mode: the continuation logic is disabled and only the initial entry is traded, while basket TP and trailing protection remain active.
3. Basket Management & Exit Logic
- All orders of the same direction and magic number form one basket with a volume-weighted average price.
- Basket take-profit target = average price ± configured distance (points).
- When the target is reached, two selectable behaviors:
- Trail SL: place the stop loss at the configured trail distance behind the target and keep trailing it as price moves further (recommended, locks in profit).
- Close basket: close all positions immediately at target.
- Optional basket maximum loss: the whole basket is closed once floating loss reaches a set amount (account currency) — prevents deep drawdowns and stop-outs.
- A hard margin-safety guard force-closes baskets if the account margin level drops below 250%, protecting the account from margin calls.
- Optional per-order stop loss as an additional protection layer.
4. Risk Settings (Inputs)
| Parameter | Default | Purpose |
|---|---|---|
| Magic number | 20260917 | Identifies the EA's own positions |
| Initial lots | 0.01 | Base volume per basket |
| Envelopes period / deviation | 5 / 0.05% | Signal band sensitivity |
| Min body ratio / min body points | 0.70 / 30 | Full-body candle filter |
| Pyramid step / max levels / multiplier | 100 / 3 / 1.5 | Positive-P&L continuation |
| Basket TP target | 250 pts | Profit target from average entry |
| Trail distance / min step | 150 / 20 pts | Trailing protection |
| Basket max loss | 250 | Basket emergency close (0 = off) |
| Max basket trades | 10 | Position cap per basket |
| Max entry spread | 60 pts | Spread filter (0 = off) |
All risk parameters are fully configurable and must be adjusted to your account size, symbol and risk tolerance.
5. User Supervision — Required, Not Optional
Although GoldContinuationEA is fully automated, it is NOT a "set-and-forget" product. For safe and optimized performance the user is expected to:
- Test on a demo account first — as long as necessary to become familiar with its behavior across market cycles (trending, ranging, high-volatility).
- Assess market conditions and choose when to run it. The EA performs best in trending conditions where breakouts continue; in choppy or ranging markets it may produce frequent exits. Disable the EA or adjust the signal/deviation settings when conditions are not suitable.
- Analyse and set risk parameters to suit current volatility and your account. For example: reduce lots or widen the basket max loss in high-volatility news periods; never trade with risk settings that exceed your account's capacity.
- Monitor high-impact news and events. Spreads widen and price can gap; be prepared to pause the EA or reduce exposure manually.
- Review performance regularly (journal, trades, balance) and refine inputs only after enough observations.
6. Trading Recommendations
- Primary: GOLD (XAUUSD), M1/M5/M15/H1 timeframe, hedging account (for full pyramiding).
- Leverage: sufficient margin for up to the configured max basket positions.
- Start risk-small (e.g., 0.01 lots per $10k) and scale up only after consistent demo results.
- Run each input set in the Strategy Tester over several historical periods before applying it to a live account.
7. Disclaimer
Trading foreign exchange, metals and CFDs on margin carries a high level of risk and may not be suitable for all investors. Past performance — including any backtest results — does not guarantee future results. Never risk funds you cannot afford to lose. The author is not a financial adviser; this software is provided "as is" for educational and informational purposes. Always test on a demo account and, where in doubt, consult a licensed financial professional.
