Buys one contract when the high reaches the prior 126-bar high, with the 21-period EMA above the 50-period EMA and RSI(14) between 40 and 80. Exits at a 15% target, 8% stop, or a close below the 21-period EMA.
Best run of 27. Gold, Daily, spread 0.6, from run pf:2026-10-05-GOLD-D.tsv:9.
| Period | Up to 2026-10-05 |
| Instrument | Gold, Daily |
| 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-05 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| GoldBest run | Daily | 2.29 | 107 | 48.60 | 2,014 EUR | -310 |
| USD/JPY | Daily | n/a | 103 | 38.83 | 514,210 USD | -319,450 |
| USD/JPY | 30 min | n/a | 1,632 | 35.78 | 345,200 USD | -91,640 |
| USD/JPY | 1 hour | n/a | 1,156 | 39.01 | 296,910 USD | -89,930 |
| USD/JPY | 4 hours | n/a | 306 | 42.16 | 237,700 USD | -90,490 |
| USD/JPY | 15 min | n/a | 1,669 | 35.23 | 157,870 USD | -82,600 |
| EUR/USD | 2 min | n/a | 1,651 | 25.44 | 69,701 USD | -50,980 |
| EUR/USD | 3 min | n/a | 1,670 | 27.01 | 57,050 USD | -25,267 |
| EUR/USD | Daily | n/a | 94 | 45.74 | 45,776 USD | -23,360 |
| EUR/USD | 4 hours | n/a | 369 | 36.59 | 36,598 USD | -34,955 |
| Silver | Daily | n/a | 97 | 38.14 | 34,877 USD | -6,322 |
| Silver | 4 hours | n/a | 275 | 36.36 | 24,679 USD | -6,850 |
| Nikkei 225 | 4 hours | n/a | 251 | 41.04 | 16,349 USD | -4,834 |
| Nikkei 225 | Daily | n/a | 136 | 36.76 | 12,675 USD | -8,333 |
| Silver | 1 hour | n/a | 1,004 | 32.97 | 9,307 USD | -8,810 |
| Nikkei 225 | 1 hour | n/a | 875 | 36.80 | 8,557 USD | -5,353 |
| Nasdaq 100 | Daily | n/a | 187 | 43.32 | 8,534 EUR | -2,419 |
| Nasdaq 100 | 4 hours | n/a | 398 | 39.20 | 6,719 EUR | -2,107 |
| Brent Crude | Daily | n/a | 50 | 46.00 | 6,282 EUR | -2,971 |
| Dow Jones | 1 hour | n/a | 378 | 38.62 | 5,138 EUR | -3,215 |
| Nasdaq 100 | 1 hour | n/a | 1,312 | 34.07 | 4,926 EUR | -2,016 |
| DAX 40 | 30 min | n/a | 1,795 | 36.66 | 4,439 EUR | -2,222 |
| DAX 40 | 4 hours | n/a | 332 | 40.06 | 3,068 EUR | -2,236 |
| DAX 40 | 1 hour | n/a | 1,101 | 35.51 | 2,566 EUR | -2,546 |
| Gold | 1 hour | n/a | 986 | 40.16 | 1,617 EUR | -594 |
| Gold | 4 hours | n/a | 283 | 42.40 | 1,474 EUR | -374 |
| Gold | 30 min | n/a | 1,625 | 37.42 | 1,365 EUR | -566 |
Charts
Top 10 of 27 runs. The full list is in the table above.
The code
// ============================================================== // Prior High Breakout With Trend // ProRealAlgos Strategy Library | prorealalgos.com // Type: Breakout // Direction: Long only // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false hh = highest[126](high) emafast = ExponentialAverage[21](close) emaslow = ExponentialAverage[50](close) myRsi = RSI[14](close)
17 more lines: the entry and exit rules.
Setup
Gold had no history beyond the standard run, so both runs used 13,000 bars.
| Bars available | 13,000 |
| Net, standard 200,000-bar run | 2,013.90 EUR |
| Net, long run | 2,013.90 EUR |
| Net on the older data alone | 0.00 EUR |
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 27 market and timeframe combinations. The best run was Gold, Daily, with a profit factor of 2.29 over 107 trades.
The best run had a maximum drawdown of 310 EUR at the tested position size, against a net result of 2,014 EUR.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.