I added a machine-learning filter to my Gold breakout EA. Here is what it did out of sample
Most breakout systems on Gold fail for the same reason: too many breakouts fail. I wanted to know whether a small machine-learning model could tell the good ones from the bad ones, without letting it pick direction at all.
The setup
The base strategy is a plain M15 breakout on XAUUSD with a hard stop-loss on every trade. A LightGBM model, exported to ONNX and run inside MT5, scores each breakout candidate from 0 to 1 using about 30 features (higher-timeframe structure, volatility regime, momentum, spread). Low scores are skipped. The model never decides buy or sell.
The honest test
I trained the model on 2024 data only, then ran it in the MT5 Strategy Tester on 2025-2026 with real ticks: data it had never seen.
| Breakout only | Breakout + AI filter | |
|---|---|---|
| Profit factor | 1.17 | 1.72 |
| Max drawdown | 24% | 12% |
| Trades | 200 |
The filter cut the drawdown in half. That is the result I care about.
What did not work
Models that tried to predict direction on M15 (LightGBM, MLP, logistic regression) failed in every walk-forward test. Filtering a rule-based entry worked; replacing it did not.
Caveats
Two years of out-of-sample data is not a guarantee, and 2025-2026 was a strong trend period for Gold. Results depend heavily on risk per trade: at the EA's default 10% risk per trade the maximum drawdown in testing reached 46.9%; at 1% risk it was about 12%. Start small and demo-test first. There is no live signal yet.
The EA is Your Future AI (free demo in your Strategy Tester). Video: https://youtu.be/MMBXenHpXyI
My other Gold EAs: ApexGold MTF Engine (breakout, M5-D1) and ApexGold Neural AI (rule-based pullback, M30-D1; it uses no machine learning).
Backtest results are hypothetical. Past performance does not guarantee future results. Trading Gold and CFDs carries a high level of risk.


