Join waitlist
Strategies / Breakout / Prior High Breakout With Trend

Prior High Breakout With Trend

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.

BreakoutLong onlySwingGoldDaily
2.29Profit factor
2,014Net profit EUR
48.60%Win rate
107Trades
-310Max drawdown
18.82Avg trade

Best run of 27. Gold, Daily, spread 0.6, from run pf:2026-10-05-GOLD-D.tsv:9.

Entry rules, long

  1. The 21-period EMA is above the 50-period EMA.
  2. RSI(14) is above 40 and below 80.
  3. Entries are checked only after bar 127, and only when no position is open.

Exit rules

  1. A long also closes when the close falls below the 21-period EMA after closing at or above it on the prior bar.

Test conditions

PeriodUp to 2026-10-05
InstrumentGold, Daily
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-05

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
GoldBest runDaily2.29 10748.602,014 EUR-310
USD/JPYDailyn/a 10338.83514,210 USD-319,450
USD/JPY30 minn/a 1,63235.78345,200 USD-91,640
USD/JPY1 hourn/a 1,15639.01296,910 USD-89,930
USD/JPY4 hoursn/a 30642.16237,700 USD-90,490
USD/JPY15 minn/a 1,66935.23157,870 USD-82,600
EUR/USD2 minn/a 1,65125.4469,701 USD-50,980
EUR/USD3 minn/a 1,67027.0157,050 USD-25,267
EUR/USDDailyn/a 9445.7445,776 USD-23,360
EUR/USD4 hoursn/a 36936.5936,598 USD-34,955
SilverDailyn/a 9738.1434,877 USD-6,322
Silver4 hoursn/a 27536.3624,679 USD-6,850
Nikkei 2254 hoursn/a 25141.0416,349 USD-4,834
Nikkei 225Dailyn/a 13636.7612,675 USD-8,333
Silver1 hourn/a 1,00432.979,307 USD-8,810
Nikkei 2251 hourn/a 87536.808,557 USD-5,353
Nasdaq 100Dailyn/a 18743.328,534 EUR-2,419
Nasdaq 1004 hoursn/a 39839.206,719 EUR-2,107
Brent CrudeDailyn/a 5046.006,282 EUR-2,971
Dow Jones1 hourn/a 37838.625,138 EUR-3,215
Nasdaq 1001 hourn/a 1,31234.074,926 EUR-2,016
DAX 4030 minn/a 1,79536.664,439 EUR-2,222
DAX 404 hoursn/a 33240.063,068 EUR-2,236
DAX 401 hourn/a 1,10135.512,566 EUR-2,546
Gold1 hourn/a 98640.161,617 EUR-594
Gold4 hoursn/a 28342.401,474 EUR-374
Gold30 minn/a 1,62537.421,365 EUR-566

Charts

Results by run

Top 10 of 27 runs. The full list is in the table above.

Net profitMax drawdown

The code

ProBuilder code, as tested

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

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

EMARSI
Longer historyRe-run on up to 1,000,000 barsGold · Daily · older data 0.00 EUR

Gold had no history beyond the standard run, so both runs used 13,000 bars.

Gold · Daily

Bars available13,000
Net, standard 200,000-bar run2,013.90 EUR
Net, long run2,013.90 EUR
Net on the older data alone0.00 EUR
Read this firstKnown weaknesses2 points
  • Results include the spread only. Commissions and overnight financing are not included.
  • The code is published as it was backtested and has not been compiled again since.

Questions

About this strategy

Can I run Prior High Breakout With Trend 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 27 market and timeframe combinations. The best run was Gold, Daily, with a profit factor of 2.29 over 107 trades.

How large was the drawdown?

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

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

Trend Surfer

Uses the same indicator.

1.04 PF · 10,813 trades

CCI Breakout

Best run on the same market, Gold.

1.08 PF · 6,065 trades

Bollinger Upper Band Breakout Long

Also a breakout strategy.

2.30 PF · 189 trades

Get the full rules, the complete code and the ProRealAlgos portfolio as a member.

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