What I built

  • Trades gold (XAUUSD) on MetaTrader 5, written in MQL5.
  • Reads recent swing highs and lows on the H1 chart and, at fixed decision hours, rests one buy stop above the price and one sell stop below it.
  • Every order is placed with a hard stop loss and a take profit.
  • A tight trailing stop, fixed or ATR-based, manages each filled trade.
  • Pending orders expire after a set number of days.
  • No grid, no martingale and no averaging down.
  • An optional news filter removes resting orders around high-impact calendar events.
  • Respects the broker's volume, margin, stops-level and freeze-level limits and the symbol's trading sessions, the checks the MQL5 Market runs before it accepts an EA.
  • Its trades can be followed on a public MQL5 signal.
  • Published and sold on the MQL5 Market.

Tools

  • MQL5
  • MetaTrader 5
  • XAUUSD
  • Strategy Tester

See it live

View on MQL5 Market →
Live signal on MQL5 →

Backtest results

MetaTrader 5 Strategy Tester, XAUUSD H1, 2026.01.01 to 2026.10.20, modeling: 1 minute OHLC, deposit 10,000 USD, leverage 1:500. One 0.01 lot per 50 USD of balance, at most 5 lots per order, ATR trailing stop (14 × 0.25 on M1), decisions every 2 hours, news filter on.

Total net profit1,312,186.96 USD
Gross profit / gross loss1,529,699.33 / −217,512.37
Profit factor7.03
Recovery factor104.43
Sharpe ratio18.64
Expected payoff1,615.99
Total trades812
Profit trades713 (87.81%)
Short trades (won)328 (86.89%)
Long trades (won)484 (88.43%)
Balance drawdown maximal6,110.00 (6.52%)
Equity drawdown maximal12,565.00 (27.52%)
Equity drawdown relative27.52% (12,565.00)
Largest profit / loss trade32,985.50 / −2,000.00
Average profit / loss trade2,145.44 / −1,974.30
Maximum consecutive losses3 (−6,000.00)

Backtest results do not guarantee future results.

Screenshots

Sigma7 Gold Scalper MT5 Strategy Tester backtest results, XAUUSD H1, 2026-01-01 to 2026-10-20
Sigma7 Gold Scalper MT5 Strategy Tester balance graph, XAUUSD H1, 2026-01-01 to 2026-10-20

Related service

MT4 / MT5 Expert Advisors →

Have a bot, a backend or a strategy in mind?

Tell me what you want to build and where you are with it. Send a few lines about the project and I’ll reply with questions and next steps.

Rajshahi, Bangladesh