Join waitlist
Strategies / Breakout / Swing Level Breakout

Swing Level Breakout

Buys when the close crosses above a swing high level, taken from the second most recent bar where the high crossed above the prior high. Closes the long when the close crosses below a swing low level, taken the same way from lows.

BreakoutLong onlySwingNasdaq 1004 hours
n/aProfit factor
9,863Net profit EUR
38.08%Win rate
1,460Trades
-6,107Max drawdown
6.76Avg trade

Best run of 8. Nasdaq 100, 4 hours, spread 3, from run sweeps:2026-10-12-NAS100-4h-opt.tsv:79.

Entry rules, long

  1. A swing high is recorded on a bar where the high rises above the prior bar's high, after a bar where it did not.
  2. The swing high level is the one recorded before the most recent swing high.
  3. Only when no position is open.

Exit rules

  1. The swing low level uses the same rule applied to lows.

Test conditions

PeriodUp to 2026-10-12
InstrumentNasdaq 100, 4 hours
Spread3 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-12

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
Nasdaq 100Best run4 hoursn/a 1,46038.089,863 EUR-6,107
Nikkei 225Dailyn/a 57839.4539,721 USD-24,175
Nikkei 2254 hoursn/a 1,16839.9817,059 USD-10,154
Dow JonesDailyn/a 66238.6716,860 EUR-8,684
Nasdaq 100Dailyn/a 53340.5312,674 EUR-4,216
Brent Crude4 hoursn/a 80737.794,356 EUR-4,317
Gold4 hoursn/a 1,44337.493,477 EUR-1,028
S&P 500Dailyn/a 69139.362,493 EUR-1,370

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Swing Level Breakout
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Breakout
// Direction: Long only
// Timeframe tested: 4 hours
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE hlast = 0
ONCE hprev = 0
ONCE hcnt = 0
ONCE llast = 0
ONCE lprev = 0
ONCE lcnt = 0

26 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.
Read this firstKnown weaknesses3 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • The maximum drawdown of 6,107 EUR is large next to the net profit of 9,863 EUR.
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.

Questions

About this strategy

Can I run Swing Level Breakout 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 8 market and timeframe combinations. The best run by trade count was Nasdaq 100, 4 hours, with 1,460 trades.

How large was the drawdown?

The best run had a maximum drawdown of 6,107 EUR at the tested position size, against a net result of 9,863 EUR.

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

Volatility Spike Regression Long

Best run on the same market, Nasdaq 100.

1.22 PF · 1,850 trades

Big Candle Breakout

Also a breakout strategy.

n/a PF · 4,636 trades

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

Copy trading on US indices is available to ProRealAlgos members as spots open.

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