The strategy buys at the market when a bar opens at least 0.1% above the prior close, provided no long is open. It exits 10 bars after the entry bar, so each trade lasts a fixed number of bars.
Best run of 30. Gold, 10 min, spread 0.6, from run pf:2026-10-12-GOLD-10m.tsv:2.
| Period | Up to 2026-10-12 |
| 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-12 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| GoldBest run | 10 min | 1.83 | 139 | 51.80 | 503 EUR | -106 |
| USD/JPY | 1 hour | n/a | 170 | 48.24 | 38,680 USD | -28,270 |
| Dow Jones | Daily | n/a | 316 | 52.22 | 10,338 EUR | -9,918 |
| Silver | 15 min | n/a | 492 | 42.89 | 9,765 USD | -3,773 |
| Nikkei 225 | 4 hours | n/a | 278 | 52.88 | 7,996 USD | -6,104 |
| Dow Jones | 4 hours | n/a | 98 | 58.16 | 7,598 EUR | -2,833 |
| Silver | 5 min | n/a | 223 | 47.53 | 7,348 USD | -5,201 |
| Nasdaq 100 | 4 hours | n/a | 332 | 54.82 | 4,993 EUR | -1,660 |
| Nikkei 225 | 5 min | n/a | 84 | 55.95 | 3,753 USD | -880 |
| Nasdaq 100 | 1 hour | n/a | 496 | 49.80 | 3,363 EUR | -1,426 |
| Nikkei 225 | 2 min | n/a | 32 | 62.50 | 2,664 USD | -554 |
| Nikkei 225 | 3 min | n/a | 45 | 57.78 | 2,555 USD | -813 |
| Dow Jones | 1 hour | n/a | 142 | 60.56 | 2,531 EUR | -2,393 |
| Nasdaq 100 | 30 min | n/a | 381 | 52.49 | 2,041 EUR | -1,368 |
| DAX 40 | 30 min | n/a | 388 | 51.03 | 1,837 EUR | -1,038 |
| DAX 40 | 15 min | n/a | 175 | 51.43 | 1,514 EUR | -724 |
| S&P 500 | Daily | n/a | 436 | 51.83 | 1,416 EUR | -1,402 |
| Nasdaq 100 | 15 min | n/a | 217 | 51.15 | 1,241 EUR | -888 |
| Nasdaq 100 | 10 min | n/a | 131 | 50.38 | 1,201 EUR | -560 |
| Nikkei 225 | 1 min | n/a | 16 | 62.50 | 1,158 USD | -657 |
| DAX 40 | 10 min | n/a | 99 | 52.53 | 1,103 EUR | -181 |
| S&P 500 | 4 hours | n/a | 269 | 57.62 | 1,039 EUR | -393 |
| Nasdaq 100 | 5 min | n/a | 70 | 50.00 | 753 EUR | -315 |
| S&P 500 | 1 hour | n/a | 339 | 52.21 | 410 EUR | -247 |
| S&P 500 | 30 min | n/a | 279 | 52.33 | 387 EUR | -222 |
| Gold | 15 min | n/a | 204 | 48.53 | 366 EUR | -178 |
| Gold | 5 min | n/a | 113 | 46.90 | 359 EUR | -102 |
| S&P 500 | 15 min | n/a | 166 | 51.20 | 247 EUR | -155 |
| Nasdaq 100 | 2 min | n/a | 30 | 63.33 | 223 EUR | -137 |
| S&P 500 | 10 min | n/a | 102 | 48.04 | 120 EUR | -99.98 |
Charts
Top 10 of 30 runs. The full list is in the table above.
The code
// ============================================================== // Opening Gap Up Time Exit // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long only // Timeframe tested: 10 minutes // ============================================================== DEFPARAM CumulateOrders = false ONCE ebar = 0 ONCE waslong = 0 gap = (open - close[1]) / close[1] * 100
17 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 30 market and timeframe combinations. The best run was Gold, 10 minutes, with a profit factor of 1.83 over 139 trades.
The best run had a maximum drawdown of 106 EUR at the tested position size, against a net result of 503 EUR.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.