Join waitlist
Strategies / Breakout / Prior High Breakout With SuperTrend

Prior High Breakout With SuperTrend

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.

BreakoutLong onlyIntradayGold5 min
1.65Profit factor
2,326Net profit EUR
43.00%Win rate
307Trades
-345Max drawdown
7.57Avg trade

Best run of 48. Gold, 5 min, spread 0.6, from run pf:2026-10-10-GOLD-5m.tsv:1.

Entry rules, long

  1. The SuperTrend, using a 10-period ATR and factor 3, is bullish.

Exit rules

  1. The close falls below the lowest low of the prior 126 bars.

Test conditions

PeriodUp to 2026-10-10
InstrumentGold, 5 minutes
Spread0.6 points
Starting capital1,000,000
CostsSpread only. Commissions and overnight financing are not included.
BarsUp to 200,000 bars, fewer where the instrument has less history
Last tested2026-10-11

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
GoldBest run5 min1.65 30743.002,326 EUR-345
Nikkei 22530 min1.60 31445.2231,654 USD-6,187
Nasdaq 10030 min1.58 34444.7713,394 EUR-2,822
USD/JPY10 min1.56 31145.98497,980 USD-102,760
Gold3 min1.44 30939.481,731 EUR-445
USD/JPY1 hourn/a 21341.31537,030 USD-186,230
USD/JPY15 minn/a 30743.00329,970 USD-151,470
USD/JPY30 minn/a 31735.96246,510 USD-225,030
EUR/USDDailyn/a 1662.5065,167 USD-30,194
Nikkei 225Dailyn/a 1758.8258,212 USD-11,480
Silver30 minn/a 28241.8429,983 USD-10,126
Nikkei 2254 hoursn/a 4042.5026,551 USD-9,901
Nikkei 22515 minn/a 31341.8523,618 USD-7,760
Nikkei 2251 hourn/a 16044.3822,280 USD-9,163
Nasdaq 100Dailyn/a 1866.6721,574 EUR-3,269
Silver3 minn/a 32144.2419,206 USD-9,428
Dow JonesDailyn/a 2356.5218,663 EUR-6,798
Silver2 minn/a 31446.1818,633 USD-12,378
Silver15 minn/a 31339.9416,509 USD-15,350
Nasdaq 1004 hoursn/a 5464.8115,062 EUR-3,826
Nikkei 22510 minn/a 32340.5614,464 USD-12,230
DAX 40Dailyn/a 2657.6912,632 EUR-5,351
Nasdaq 10015 minn/a 32144.8610,253 EUR-4,369
GBP/USDDailyn/a 1855.569,059 USD-4,269
Nasdaq 1001 hourn/a 22441.528,833 EUR-4,116
Nikkei 2251 minn/a 33440.128,712 USD-7,433
US Crude OilDailyn/a 1656.258,454 EUR-6,375
Brent Crude4 hoursn/a 2356.527,540 EUR-3,436
DAX 401 hourn/a 18341.535,894 EUR-4,096
Dow Jones30 minn/a 14042.145,648 EUR-5,449
US Crude Oil4 hoursn/a 3342.425,457 EUR-3,799
Nasdaq 10010 minn/a 34342.865,383 EUR-4,824
FTSE 100Dailyn/a 1957.894,439 EUR-2,541
Dow Jones3 minn/a 36036.674,179 EUR-3,987
Nasdaq 1002 minn/a 33738.583,967 EUR-2,743
S&P 500Dailyn/a 2766.673,820 EUR-845
GoldDailyn/a 1546.673,358 EUR-1,466
DAX 405 minn/a 33943.663,187 EUR-2,295
Nasdaq 1003 minn/a 35840.502,890 EUR-2,303
Gold4 hoursn/a 4748.942,815 EUR-962
Gold30 minn/a 29344.032,588 EUR-1,051
S&P 50030 minn/a 34444.482,442 EUR-636
S&P 5004 hoursn/a 5752.632,357 EUR-1,273
Gold1 hourn/a 19143.981,826 EUR-1,099
Gold15 minn/a 30741.371,713 EUR-927
Gold10 minn/a 31142.441,603 EUR-844
S&P 5001 hourn/a 22244.141,596 EUR-598
Gold2 minn/a 31836.791,032 EUR-541

Charts

Results by run

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

ProBuilder code, as tested

// ==============================================================
// 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

How to load it

  1. Copy the code with the copy button on the code block.
  2. In ProRealTime, open a chart of the instrument and timeframe you want to test, then open ProOrder > New trading system and choose "Create with programming".
  3. Paste the code, give the system a name and save it.
  4. Click "Backtest", set your own spread and position size, and run it before you consider trading it live.

Indicators used

SuperTrendATR
Longer historyRe-run on up to 1,000,000 barsGold · 5 min · older data -700.70 EUR

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.

Gold · 5 min

Bars available1,000,000
Net, standard 200,000-bar run2,325.50 EUR
Net, long run1,624.80 EUR
Net on the older data alone-700.70 EUR
Read this firstKnown weaknesses2 points
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.
  • On the older part of the 1,000,000-bar history it lost -701 EUR.

Questions

About this strategy

Can I run Prior High Breakout With SuperTrend in ProOrder?

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.

Which markets was it tested on?

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.

How large was the drawdown?

The best run had a maximum drawdown of 345 EUR at the tested position size, against a net result of 2,326 EUR.

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

KDJ J Line Momentum Long

Uses the same indicator.

4.17 PF · 6,135 trades

CCI Breakout

Best run on the same market, Gold.

1.08 PF · 6,065 trades

Range Breakout Pending

Also a breakout strategy.

1.64 PF · 808 trades

Put your name on the ProRealAlgos waitlist to trade a tested portfolio instead of single strategies.

The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.

Past backtest results do not guarantee future results. This is not financial advice. Curated and maintained by ProRealAlgos. ProRealTime™ is a trademark of ProRealTime SAS. prorealalgos.comStatsDocs