Gold Trend Resume
- Experts
-
Donizeti Aparecido Alves Ferreira Junior
Software developer and founder of D7 Bots, building algorithmic trading tools for MetaTrader 5. - Versione: 2.11
- Attivazioni: 5
GoldTrendResume is an MT5 Expert Advisor whose audited scientific default trades XAUUSD using H4 decision data. It looks for continuation of an established trend after a pullback: a slow EMA defines the regime, a fast EMA identifies the pullback/resumption structure, and ATR expresses stop distance, spread tolerance and risk sizing.
The EA is not tied to the host chart symbol or chart timeframe. The trading instrument is selected explicitly by InpTradeSymbol (default XAUUSD) and all strategy series, indicator handles, quotes, positions and orders use that configured symbol with H4 fixed internally. Enter the exact broker symbol name if the broker uses a suffix or prefix. There is no automatic fallback to another asset.
Audited default logic
- Decision timeframe: H4, internal and fixed.
- Fast EMA: 30.
- Slow EMA: 120.
- ATR: 20, from completed bars.
- Long resumption: the last closed bar is above the slow EMA, the slow EMA is rising, the prior closed bar stayed above the slow EMA while at/below the fast EMA, and the last closed bar closes back above the fast EMA.
- Short resumption: symmetric inverse conditions.
- Default stop mode: ATR, 2.0 × ATR(20).
- Default target: 2.0R from the executable stop distance.
- Spread guard: current spread <= 0.05 × ATR(20).
- Default trailing, breakeven, maximum holding bars, fast-EMA failure exit and mirror direction are disabled.
- Magic number: 26090493.
- Position sizing uses current equity and executable stop distance through OrderCalcProfit, rounds volume down to the broker step and reduces volume if margin would exceed 95% of free margin.
InpRiskPercent keeps 1.00% as the scientific default and accepts 0.10% through 10.00% so 5% and 10% risk scenarios can be configured without changing signal logic. The historical results below all used 1.00%. Higher risk is not a claim of higher quality or expected profit; it materially increases requested exposure, drawdown and loss potential and may be constrained by margin or minimum-volume rules.
Historical Strategy Tester evidence
These figures are MetaTrader 5 Strategy Tester backtests, not live trading results. The audited commercial pair used MetaQuotes-Demo, model 1, and a virtual initial deposit of USD 10,000, with the same frozen scientific configuration.
In-sample: 2020-01-01 to 2024-12-31
- Net profit: USD +1,143.27
- Trades: 143
- Profit factor: 1.14
- Maximum balance drawdown: 13.02%
- Observed frequency: 2.349 trades per 30 days
Annual net inside the IS window was not uniformly positive:
- 2020: USD -357.93
- 2021: USD -227.78
- 2022: USD +427.48
- 2023: USD +1,135.76
- 2024: USD +165.74
Out-of-sample: 2025-01-01 to 2026-10-03
- Net profit: USD +1,139.09
- Trades: 46
- Profit factor: 1.57
- Maximum balance drawdown: 5.68%
- Observed frequency: 2.156 trades per 30 days
Annual net inside that OOS window:
- 2025: USD +437.75
- 2026 through October 3: USD +701.34
The commercial verification records profitable IS, profitable untouched OOS, the same frozen configuration and native MT5 reports. Separate IS and OOS closed-deal balance curves are retained. Drawdown, profit factor, WFA, Monte Carlo, stress and other diagnostics are reported evidence rather than extra commercial pass/fail thresholds.
Host chart, synchronization and execution
The EA can be attached to a tick-producing MT5 chart without using that chart to select the traded asset or strategy timeframe. Host-chart ticks trigger checks of the configured trading symbol's synchronized H4 series. Decisions use only closed bars at shifts 1 and 2. If the symbol or series is not synchronized, the EA fails closed and does not trade.
Before an order attempt, the EA checks the configured symbol's trading session and obtains its own current bid/ask. It does not synthesize trades, use MQL_TESTER branches, switch to another asset, or relax the trend-resumption signal.
Evidence limits
The historical evidence is MetaQuotes-Demo / model 1 / virtual USD 10,000. It is not Vantage evidence, not real-tick validation, and not live profit. Broker symbol naming, XAUUSD contract size, tick value, spread, swap, stops/freeze levels, minimum volume, margin and session schedules can materially change execution.
Host-chart timing matters: a different host can produce a different callback sequence even when aggregate results happen to match. The reference historical curves and statistics above come from the scientific XAUUSD H4 host. For the closest reproduction of those reports, use XAUUSD H4 as the host chart.
Version 2.11 has been compiled and technically tested. In the recorded IS host check, the XAUUSD H4 target run and a heterogeneous host both finished with 143 trades and USD +1,143.27, but an independent review found different execution sequences, so this is not claimed as full host parity.
Historical simulation does not guarantee future results.
