The system tracks bars whose open, high, low and close all sit below or above a 5-period EMA as alert levels. It buys when price breaks the latest alert high, or sells short on a break of the alert low, with a stop and a target at 1.5 times the risk.
Best run of 21. Gold, 10 min, spread 0.6, from run sweeps:2026-10-11-GOLD-10m-opt.tsv:45.
| Period | Up to 2026-10-11 |
| Instrument | Gold, 10 minutes |
| Spread | 0.6 points |
| Starting capital | 1,000,000 |
| Costs | Spread only. Commissions and overnight financing are not included. |
| Bars | Up to 200,000 bars, fewer where the instrument has less history |
| Last tested | 2026-10-11 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| GoldBest run | 10 min | n/a | 339 | 23.89 | 2,231 EUR | -1,629 |
| USD/JPY | 30 min | n/a | 49 | 2.04 | 773,030 USD | -260,990 |
| USD/JPY | 15 min | n/a | 160 | 0.62 | 434,760 USD | -245,400 |
| Nikkei 225 | 1 hour | n/a | 63 | 28.57 | 59,615 USD | -12,691 |
| Nikkei 225 | Daily | n/a | 169 | 38.46 | 37,079 USD | -31,906 |
| Nasdaq 100 | 1 hour | n/a | 26 | 7.69 | 29,094 EUR | -6,233 |
| Dow Jones | 30 min | n/a | 159 | 37.74 | 28,486 EUR | -8,366 |
| Dow Jones | 4 hours | n/a | 18 | 38.89 | 25,121 EUR | -9,162 |
| Dow Jones | 15 min | n/a | 303 | 38.94 | 24,198 EUR | -9,761 |
| Nikkei 225 | 1 min | n/a | 34 | 17.65 | 15,838 USD | -13,148 |
| Nasdaq 100 | 5 min | n/a | 18 | 22.22 | 13,392 EUR | -5,875 |
| DAX 40 | 10 min | n/a | 53 | 26.42 | 9,552 EUR | -4,474 |
| S&P 500 | 1 hour | n/a | 76 | 9.21 | 6,446 EUR | -1,317 |
| S&P 500 | 15 min | n/a | 4 | 25.00 | 4,969 EUR | -1,319 |
| S&P 500 | 10 min | n/a | 73 | 17.81 | 3,510 EUR | -1,323 |
| FTSE 100 | 10 min | n/a | 32 | 31.25 | 3,434 EUR | -1,320 |
| S&P 500 | 5 min | n/a | 4 | 25.00 | 3,076 EUR | -1,332 |
| FTSE 100 | 15 min | n/a | 38 | 21.05 | 2,981 EUR | -2,927 |
| Gold | 5 min | n/a | 10 | 20.00 | 2,205 EUR | -1,631 |
| FTSE 100 | 2 min | n/a | 7 | 14.29 | 1,327 EUR | -1,265 |
| S&P 500 | 2 min | n/a | 46 | 10.87 | 1,232 EUR | -699 |
Charts
Top 10 of 21 runs. The full list is in the table above.
The code
// ============================================================== // EMA Alert Candle Breakout // ProRealAlgos Strategy Library | prorealalgos.com // Type: Breakout // Direction: Long & short // Timeframe tested: 10 minutes // ============================================================== DEFPARAM CumulateOrders = false ONCE hi = 0 ONCE hiset = 0 ONCE lo = 0 ONCE loset = 0 ema = ExponentialAverage[5](close) prevhi = hi prevhiset = hiset prevlo = lo prevloset = loset
35 more lines: the entry and exit rules.
Setup
Questions
Yes. The code is ProBuilder and runs as an automated ProOrder system. Backtest it on your own account with your own spread and position size before trading it live.
It was tested on 21 market and timeframe combinations. The best run by trade count was Gold, 10 minutes, with 339 trades.
The best run had a maximum drawdown of 1,629 EUR at the tested position size, against a net result of 2,231 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.