Simulated
XAUUSD H1 Range breakout MQL5 MarketProp-firm guard

Golden Box Breakout

A time-window range breakout for gold. One trade idea per day, a hard stop on every position.

Net profit
+59.3%
$5,928 on $10,000
Profit factor
1.26
Gross profit ÷ gross loss
Max drawdown
8.1%
Peak-to-trough equity
Trades
1,726
51.6% winners

Historical simulation: XAUUSD H1, Jan 2020 to Sep 2026, 10,000 USD start. Not indicative of future results.

Overview

What Golden Box Breakout does

Golden Box Breakout measures the high and low of a fixed early-session window on XAUUSD, places a Buy Stop above the box and a Sell Stop below it, and trades whichever side breaks first. Everything is closed at a fixed time each day, so nothing is held overnight.

  • No martingale, grid or averaging.
  • No DLLs, no external files, no web connections.
Strategy
Range breakout
Symbol
XAUUSD (Gold)
Timeframe
H1
Platform
MetaTrader 5
Minimum balance
About $1,000
Sold via
MQL5 Market

How it works

From signal to exit

  1. Measure the box

    Each day the EA records the highest and lowest price inside a fixed server-time window (03:05 to 06:05 by default) and draws the box on the chart.

  2. Place the stops

    When the window closes it places a Buy Stop at the box high and a Sell Stop at the box low. If price has already moved through an edge, it enters that side at market.

  3. Trade the first break

    Whichever side breaks first is traded. In the default single-trade mode the opposite order is cancelled the moment one side fills.

  4. Finish flat

    At a fixed time (18:55 by default) every pending order is deleted and every open position is closed. Nothing is carried overnight.

In MetaTrader 5

One real trading day from the backtest: the morning box, the buy-stop breakout and the close at the end of the day. XAUUSD M15, 3 September 2026.
One real trading day from the backtest: the morning box, the buy-stop breakout and the close at the end of the day. XAUUSD M15, 3 September 2026.

Features and protections

What is built in

  • Hard stop loss on every position

    Set as a percentage of the entry price (1.0% by default), so it adapts to the price level of gold automatically.

  • Flexible risk sizing

    Risk a percentage of balance, a fixed money amount, or a fixed lot, with a maximum-lot cap that applies in every mode.

  • Prop-firm consistency guard

    Optional. Tracks every day's result and stops trading for the day before the best day can exceed the percentage your firm allows.

  • Checked before every order

    Volume, free margin, broker stop level and pending-order limits are validated, so the server is never sent an order it would reject.

  • Restart-safe

    After a terminal or VPS restart it resumes the day where it stopped and never places duplicate orders.

  • Optional extras, off by default

    Safe pyramiding (up to 3 adds) and small randomisation of entry time, stop distance, lot size and close time.

Backtest

How it behaved in the test

Historical simulations from the MetaTrader 5 Strategy Tester. The test conditions are listed with each result so you can reproduce them.

Symbol
XAUUSD H1
Period
Jan 2020 to Sep 2026
Start balance
$10,000
Model
1-minute OHLC
History quality
86%
Price data
Fusion Markets price history (low spread)
Net profit
+59.3%
$5,928 on $10,000
Profit factor
1.26
Gross profit ÷ gross loss
Max drawdown
8.1%
Peak-to-trough equity
Trades
1,726
51.6% winners
Balance curve: % return on the start balance
Drawdown from the peak balance
Return by calendar year
Yearly return, XAUUSD backtest
YearReturn
2020+5.7%
2021+14.4%
2022+3.4%
2023−4.4%
2024+9.6%
2025+9.0%
2026*+11.5%

Trading foreign exchange, metals and cryptocurrencies on margin carries a high level of risk and may not be suitable for everyone. Backtested and hypothetical results are not a guarantee of future performance. Read the full risk disclosure.

See the full results page

Requirements

Before you install

Symbol
XAUUSD (gold)
Timeframe
Any chart timeframe. The EA reads 1-minute data internally; H1 is convenient.
Platform
MetaTrader 5
Broker
A low-spread gold account. We recommend Fusion Markets (Zero account), the broker this robot was tested on. Wide spreads and high commissions reduce results.
Server time
Defaults assume a GMT+2 / GMT+3 server. Shift the box and close times if yours differs.
Minimum balance
About $1,000 for the 0.01 lot minimum. Below about $9,000 the minimum lot risks more than 0.5% of balance.
Hosting
A VPS is recommended so the EA sees the box window and the daily close every day.

Inputs

Parameters

Range time

Range start and end hour and minute: the server-time window that forms the box.

Session close

Daily time at which orders are deleted and positions are closed.

Risk

Risk mode (% of balance, fixed money, fixed lot), risk value, stop-loss %, maximum-lot cap, what to do when risk is below the broker's minimum lot, optional take profit as a multiple of the box.

Prop-firm consistency rule

Enable, best-day maximum % of total profit, net or profitable-days basis, minimum daily cap, optional fixed daily cap, alert level, seed values for accounts with history.

Pyramiding and randomisation

Enable, trigger distance, number of adds, add size multiplier; entry delay, lot variance, stop buffer, close-time variance.

Set files and a PDF user guide are provided to buyers.

Questions

Frequently asked

Can I try it before buying?

Yes. Every product on the MQL5 Market has a free demo you can run in the MetaTrader 5 Strategy Tester. Run your own backtest on your broker's data first.

Does it work on prop-firm accounts?

It includes an optional consistency-rule guard for firms that limit the best trading day as a share of total profit. You set the percentage your firm uses. Always check your firm's rules and test on a demo account first.

Which broker and server time should I use?

We recommend Fusion Markets, the broker this robot was tested on (see the recommended-broker box on this page). Any low-spread gold account can work. The default times assume a GMT+2/GMT+3 server, which is what Fusion Markets uses. For a GMT+0 server, shift the box and close times by the difference; a ready set file is available to buyers.

Are set files and a guide included?

Set files and a PDF user guide are available to buyers through the product's Comments section and MQL5 private messages.

Is the strategy guaranteed to be profitable?

No. No strategy is. The figures shown are historical simulations and will differ from live results.

Also in the collection

Other robots

BTCUSD · H1 · Range breakout

BTC Box Breakout

The same disciplined box breakout, rebuilt for Bitcoin's volatility and its seven-day week.

Net profit
+116.4%
Profit factor
1.15
Max drawdown
27.9%

Simulated, Jan 2020 – Sep 2026

$99or rent from $30/month
MQL5 Market

NZDCAD · H1 · Mean-reversion grid

Elastic Band Grid

A Bollinger-and-RSI mean-reversion grid that waits for stretched prices to snap back.

Net profit
+98.2%
Profit factor
2.67
Max drawdown
12.8%

Simulated, Oct 2019 – Sep 2026

$99or rent from $30/month
MQL5 Market

NAS100 · M5 · Intraday momentum

Noise Area Momentum

Intraday momentum for the Nasdaq 100: it waits for price to leave its normal noise, then follows the move and is flat by the close.

Net profit
+49.1%
Profit factor
1.29
Max drawdown
9.3%

Simulated, Jan 2023 – Oct 2026

$99One live + one demo account
Direct sale

Free guide · 24 pages

New to trading robots? Start with Automated Trading Mastery

A free, plain-language introduction to algorithmic trading: what a trading robot actually is, how it makes decisions, and the steps from nothing to your first Expert Advisor running on a demo account.

Get the free guide

Ready to test Golden Box Breakout?

Start with the free demo in the MetaTrader 5 Strategy Tester, on your own broker’s data, before you commit.