Why We Built a Slow Gold EA
The first gold robot we built was a fast one: a scalper with a tight trailing stop, aiming for about 50 points a trade. In the Strategy Tester’s generated-tick mode it showed +137%. We re-ran the same week with the same lot size on 100% real ticks, and it lost 99% of the account.
The reason is simple once you see it. Gold’s spread on our test server runs at roughly 30 to 60 points. A strategy that wants 50 points pays most of its target to the spread before it starts, and generated ticks hide that cost. We retired the scalper.
The Gold Session Breakout is built the other way round. It trades once a day at most and aims at moves of hundreds to thousands of points, so the spread is a small slice of each target instead of most of it. On the example day below, the stop was about 2,100 points away and the target about 4,200.
How It Trades

All times are broker server time. The defaults assume a server on GMT+2 in winter and GMT+3 in summer, like MetaQuotes-Demo, where we tested it.
- 00:00 – 09:00: measure the range. The EA records XAUUSD’s high and low through the quiet Asian session.
- Skip unsuitable days. If the range is narrower than 0.15% of price or wider than 1.5%, or the spread is above 80 points, there is no trade that day.
- 09:00: place two orders. A buy stop 50 points above the high and a sell stop 50 points below the low. When one fills, the other is cancelled (one-cancels-other).
- Stop and target. The stop loss sits at the middle of the range and the take profit at twice the risk (2R).
- Break-even at +1R. Once the trade is one risk-unit in profit, the stop moves to the entry price.
- 16:00: cancel what did not fill. If price never left the range, both orders are removed.
- 22:00: close anything still open. The EA does not hold trades into the next session.
The diagram is a real trade from the backtest. On 7 October 2026 the range measured 0.99% of price, the sell stop filled at 09:01, the buy stop was cancelled, and the 2R target was hit at 15:27 for +$337.04.
The Backtest, Including the Parts That Look Bad
These are the EA’s shipped default strategy settings, not a configuration we picked afterwards because it looked best (see the tuning section below).

- Platform and data: MetaTrader 5 Strategy Tester, MetaQuotes-Demo, XAUUSD M5, “1 minute OHLC” model
- Period: 1 January 2024 – 8 October 2026, run as one continuous test
- Starting balance: $10,000, risking 1% of balance per trade
- Net result in this backtest: +$7,422.24, or +74% over the whole period
- Profit factor: 1.26
- Largest equity drawdown: 13.49%
- Trades: 537 — 185 hit a profit, 103 were closed at break-even after the stop moved to entry, and 249 lost
- Average losing trade: −$115.47. Largest loss: −$175.40, which was 1.00% of the balance at the time
- Worst losing streak: 6 trades in a row, −$805.66
MetaTrader’s summary counts the break-even exits as winning trades and so reports a 53.6% win rate with an average win of $125.60. Strictly, 34.5% of trades made money. The strategy works because its winners are about twice the size of its losers, not because it is usually right. Expect long runs where it is not.
One detail of the run: the daily loss stop and the drawdown halt were switched off, so the curve shows the strategy on its own. Switching them on at the shipped 3% and 30% would not have changed a single trade. The EA takes one trade a day at most, the worst day in the test was −1.00%, and the deepest drawdown never came near 30%.
Three periods, tested separately
A single long run can hide a weak stretch. These are three separate tests on the same default settings, $10,000 and 1% risk each time:
| Period | Tick model | Net | Profit factor | Max drawdown | Trades |
|---|---|---|---|---|---|
| 2024 | 1-minute OHLC | +$2,013 (+20%) | 1.16 | 13.5% | 239 |
| Jan 2025 – Jun 2026 | 1-minute OHLC | +$3,304 (+33%) | 1.31 | 8.6% | 249 |
| 1 Jul – 8 Oct 2026 | 100% real ticks | +$572.07 (+5.7%) | 1.29 | 5.4% | 48 |
The last row matters most. It uses the broker’s recorded ticks with the real, changing spread, the test that sank the scalper, and those three months were never used to choose any setting. MetaTrader counted 37.5% of those 48 trades as winners.
The most recent weeks were flat. From 1 September to 8 October 2026, on real ticks, the EA finished +$7.67 on 20 trades, a profit factor of 1.01. That is break-even, and we are telling you because it is the most recent data there is.
Month by month, losses included

Nineteen of the thirty-four months finished positive. The worst, February 2024, lost 6.7%, and the account sat below its starting balance from February to April 2024. If you start the EA on a bad week, the first thing you see may be a loss.
We Tried to Tune It. It Did Not Help.
Before shipping, we ran a 72-combination grid on 2024–2025: three range end times, three stop placements, four targets from 1.5R to 3R, and break-even on or off. 70 of the 72 were profitable, which tells you the idea holds up under nearby settings rather than living on one lucky number.
Then we tested the best-looking region against the defaults on 2026 data that neither had seen. It did not beat them: the defaults made $2,186 over the unseen periods and the best tuned candidate $1,920. So the defaults stayed. A setting that wins only on the data used to pick it is fitted to the past, and we would rather ship the plainer version that held up.
Reproduce It Yourself
- Install the library with the one-click installer, or copy the EA into MQL5 → Experts (MT5) or MQL4 → Experts (MT4).
- In MetaTrader 5 open View → Strategy Tester. Choose the Gold Session Breakout, XAUUSD, M5, and a date range. For the strictest test, choose “Every tick based on real ticks”.
- Set Armed to true (the EA will not trade until you do) and start the test.
Your numbers will differ from ours. Your broker’s spread, history and especially its server clock are not the same as our demo server’s, and that difference is what a test on your own data will show you.
The Risk Controls
Every one of these stops trading rather than trying to win a loss back:
- Risk-based position size. Default 1% of balance per trade. In MT5 the lot is worked out with the broker’s own profit calculator (OrderCalcProfit), because some servers report gold’s tick value wrongly and simple formulas can size a gold trade ten times too large.
- Minimum-lot guard. If even the smallest lot your broker allows would risk more than twice your setting, the EA skips that side instead of over-risking.
- One trade a day, at most, with a stop and a target on every order.
- Daily loss stop. Default 3%: past that, no new trades until the next day.
- Maximum drawdown halt. Default 30% from the account’s peak: it stops for good and waits for you.
- Spread filter. No orders when the spread is above 80 points.
- Demo-only lock on by default, and an Armed switch that has to be set for every run.
- Licence date. Like the rest of the library, each build carries a licence date and is refreshed with library updates.
There is no martingale, no grid and no averaging down anywhere in the code. Limit your daily trades and size every position sensibly; that will do more for your account than any setting on this page.
About the MT4 Version
Both files are in the download. The MT4 build is a hand port that takes the same signals: over the same five weeks it placed 21 trades against MT5’s 20.
We do not publish MT4 performance figures, and that is deliberate. MetaTrader 4’s tester invents its ticks and uses a fixed spread. Over those same five weeks it reported +$649 where MT5 on real ticks reported +$8, the same flattering effect that fooled us with the scalper. Our MT4 server also holds gold history only from September 2026, too short for a serious test. MT5 is the proven build; if you use MT4, test it on demo first.
Honest Limitations
- The edge is modest. A profit factor of 1.26 means about $1.26 made for every $1.00 lost. A wide spread or a high commission eats into that quickly.
- Gold only. It was built and tested on XAUUSD. Other symbols are untested and we make no claim about them.
- It depends on your server clock. The 00:00–09:00 range, the 16:00 cancel and the 22:00 close assume a GMT+2/+3 server. If your broker runs a different clock, shift all four hours by the difference and backtest the result before trusting it. The range must start and end on the same server day, so some shifts cannot be matched exactly.
- The recent weeks were flat. September to early October 2026 was break-even on real ticks. Good stretches and flat stretches both happen.
- A backtest is not the future. It describes a period that has already happened. Gold’s behaviour can change, and no setting protects against that.
- Small accounts hit the minimum lot. Across the test the stop was typically about 1,000 points from entry, and one order in ten was more than 2,700 points away. At 1,000 points, 0.01 lot risks about $10, so on an account of roughly $1,000 or less even the smallest lot is already above 1% risk. Past twice your setting the EA skips the trade, so a small account may trade rarely or not at all.
- Holidays can carry a trade overnight. When the market shuts before 22:00, the trade can run into the next day. It happened four times in the test, all on US holidays.
- Your terminal has to stay on. The EA runs inside MetaTrader. If the terminal or VPS is off, nothing is managed.
Also in the Library
The MT5 & MT4 Signal EA trades the arrows of our alert indicators on forex pairs and has its own published backtest. The two are built the same way, with the strategy inside the file and every number reproducible in the Strategy Tester. Run them on different symbols.
Frequently Asked Questions
Will it make me money?
Nobody can promise that honestly. What we can show is what it did on XAUUSD from January 2024 to October 2026, with the losing months and the flat weeks left in, and give you the file so you can run the same test on your broker before you decide.
Can I run it on a live account?
There is an input to allow it, but run it on demo first, long enough to see a losing streak. Six losses in a row happened inside our test, and only about a third of trades make money.
Which settings should I change?
Start with none except the risk percentage, and only downward. The exception is the server clock: if your broker is not on GMT+2/+3, shift the range, cancel and close hours, then backtest.
Why only one trade a day?
The setup only exists once a day: the Asian range forms once and breaks once. Taking more trades would mean trading noise inside the session, which is the scalping problem this EA was built to avoid.
Is there an MT4 version?
Yes, both files ship. The MT4 build takes the same signals, but MT4’s tester cannot produce trustworthy gold results, so we only publish MT5 figures. MT5 is the proven build.
Is it included in the $39 library?
Yes. The Gold Session Breakout ships inside the lifetime library together with the Signal EA and the rest of the indicator collection — one payment, no subscription.
This content is for educational purposes only and is not financial advice. Trading involves risk. Past results do not guarantee future outcomes. Backtest figures describe what the Strategy Tester produced on historical data, not what any account will earn. Always practice responsible money management, limit your daily trades, and trade only what you can afford to lose.



