The strategy buys when the SuperTrend is bullish and the close is at or above the highest high of the prior 252 bars. It sells when the close falls below the lowest low of the prior 126 bars.
Best run of 48. Gold, 5 min, spread 0.6, from run pf:2026-10-10-GOLD-5m.tsv:1.
| Period | Up to 2026-10-10 |
| Instrument | Gold, 5 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 | 5 min | 1.65 | 307 | 43.00 | 2,326 EUR | -345 |
| Nikkei 225 | 30 min | 1.60 | 314 | 45.22 | 31,654 USD | -6,187 |
| Nasdaq 100 | 30 min | 1.58 | 344 | 44.77 | 13,394 EUR | -2,822 |
| USD/JPY | 10 min | 1.56 | 311 | 45.98 | 497,980 USD | -102,760 |
| Gold | 3 min | 1.44 | 309 | 39.48 | 1,731 EUR | -445 |
| USD/JPY | 1 hour | n/a | 213 | 41.31 | 537,030 USD | -186,230 |
| USD/JPY | 15 min | n/a | 307 | 43.00 | 329,970 USD | -151,470 |
| USD/JPY | 30 min | n/a | 317 | 35.96 | 246,510 USD | -225,030 |
| EUR/USD | Daily | n/a | 16 | 62.50 | 65,167 USD | -30,194 |
| Nikkei 225 | Daily | n/a | 17 | 58.82 | 58,212 USD | -11,480 |
| Silver | 30 min | n/a | 282 | 41.84 | 29,983 USD | -10,126 |
| Nikkei 225 | 4 hours | n/a | 40 | 42.50 | 26,551 USD | -9,901 |
| Nikkei 225 | 15 min | n/a | 313 | 41.85 | 23,618 USD | -7,760 |
| Nikkei 225 | 1 hour | n/a | 160 | 44.38 | 22,280 USD | -9,163 |
| Nasdaq 100 | Daily | n/a | 18 | 66.67 | 21,574 EUR | -3,269 |
| Silver | 3 min | n/a | 321 | 44.24 | 19,206 USD | -9,428 |
| Dow Jones | Daily | n/a | 23 | 56.52 | 18,663 EUR | -6,798 |
| Silver | 2 min | n/a | 314 | 46.18 | 18,633 USD | -12,378 |
| Silver | 15 min | n/a | 313 | 39.94 | 16,509 USD | -15,350 |
| Nasdaq 100 | 4 hours | n/a | 54 | 64.81 | 15,062 EUR | -3,826 |
| Nikkei 225 | 10 min | n/a | 323 | 40.56 | 14,464 USD | -12,230 |
| DAX 40 | Daily | n/a | 26 | 57.69 | 12,632 EUR | -5,351 |
| Nasdaq 100 | 15 min | n/a | 321 | 44.86 | 10,253 EUR | -4,369 |
| GBP/USD | Daily | n/a | 18 | 55.56 | 9,059 USD | -4,269 |
| Nasdaq 100 | 1 hour | n/a | 224 | 41.52 | 8,833 EUR | -4,116 |
| Nikkei 225 | 1 min | n/a | 334 | 40.12 | 8,712 USD | -7,433 |
| US Crude Oil | Daily | n/a | 16 | 56.25 | 8,454 EUR | -6,375 |
| Brent Crude | 4 hours | n/a | 23 | 56.52 | 7,540 EUR | -3,436 |
| DAX 40 | 1 hour | n/a | 183 | 41.53 | 5,894 EUR | -4,096 |
| Dow Jones | 30 min | n/a | 140 | 42.14 | 5,648 EUR | -5,449 |
| US Crude Oil | 4 hours | n/a | 33 | 42.42 | 5,457 EUR | -3,799 |
| Nasdaq 100 | 10 min | n/a | 343 | 42.86 | 5,383 EUR | -4,824 |
| FTSE 100 | Daily | n/a | 19 | 57.89 | 4,439 EUR | -2,541 |
| Dow Jones | 3 min | n/a | 360 | 36.67 | 4,179 EUR | -3,987 |
| Nasdaq 100 | 2 min | n/a | 337 | 38.58 | 3,967 EUR | -2,743 |
| S&P 500 | Daily | n/a | 27 | 66.67 | 3,820 EUR | -845 |
| Gold | Daily | n/a | 15 | 46.67 | 3,358 EUR | -1,466 |
| DAX 40 | 5 min | n/a | 339 | 43.66 | 3,187 EUR | -2,295 |
| Nasdaq 100 | 3 min | n/a | 358 | 40.50 | 2,890 EUR | -2,303 |
| Gold | 4 hours | n/a | 47 | 48.94 | 2,815 EUR | -962 |
| Gold | 30 min | n/a | 293 | 44.03 | 2,588 EUR | -1,051 |
| S&P 500 | 30 min | n/a | 344 | 44.48 | 2,442 EUR | -636 |
| S&P 500 | 4 hours | n/a | 57 | 52.63 | 2,357 EUR | -1,273 |
| Gold | 1 hour | n/a | 191 | 43.98 | 1,826 EUR | -1,099 |
| Gold | 15 min | n/a | 307 | 41.37 | 1,713 EUR | -927 |
| Gold | 10 min | n/a | 311 | 42.44 | 1,603 EUR | -844 |
| S&P 500 | 1 hour | n/a | 222 | 44.14 | 1,596 EUR | -598 |
| Gold | 2 min | n/a | 318 | 36.79 | 1,032 EUR | -541 |
Charts
Top 10 of 48 runs. The full list is in the table above.
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // Prior High Breakout With SuperTrend // ProRealAlgos Strategy Library | prorealalgos.com // Type: Breakout // Direction: Long only // Timeframe tested: 5 minutes // ============================================================== DEFPARAM CumulateOrders = false ONCE ub = 0 ONCE lb = 0 ONCE dir = 1 ONCE st = 0 myAtr = AverageTrueRange[10](close) upper = MedianPrice + 3.0 * myAtr lower = MedianPrice - 3.0 * myAtr
52 more lines: the entry and exit rules.
Setup
On the long run with 1,000,000 bars the net result was 1,625 EUR, against 2,326 EUR on the standard 200,000-bar run. The older data alone gave -701 EUR.
| Bars available | 1,000,000 |
| Net, standard 200,000-bar run | 2,325.50 EUR |
| Net, long run | 1,624.80 EUR |
| Net on the older data alone | -700.70 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 48 market and timeframe combinations. The best run was Gold, 5 minutes, with a profit factor of 1.65 over 307 trades.
The best run had a maximum drawdown of 345 EUR at the tested position size, against a net result of 2,326 EUR.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.