Join waitlist
Strategies / Breakout / Fractal Breakout

Fractal Breakout

A swing high is confirmed when a close is the highest of the surrounding 227 bars, which means it is only known 113 bars later. When price closes back above that level the system buys, and it sells short on the mirror setup. Exits use a 30-point target, a 5-point trailing stop and the 20-bar Donchian channel as a stop.

BreakoutLong & shortSwingS&P 5004 hours
1.71Profit factor
960Net profit EUR
77.87%Win rate
235Trades
-343Max drawdown
4.09Avg trade

Best run of 12. S&P 500, 4 hours, spread 1, from run pf:2026-09-15-USA500-4h.tsv:1.

Entry rules, long

  1. No position is open

Entry rules, short

  1. No position is open

Exit rules

  1. Profit target of 30 points
  2. Stop at the previous bar's 20-bar Donchian low for longs, high for shorts

Test conditions

PeriodUp to 2026-09-15
InstrumentS&P 500, 4 hours
Spread1 points
Contracts1
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-09-15
Parameters (6)
positionSize
Contracts per trade
1
fractalPeriod
Bars on each side of a confirmed swing close
113
longTrailPoints
Trailing stop distance for longs (points)
5
shortTrailPoints
Trailing stop distance for shorts (points)
5
channelPeriod
Donchian channel used as the protective stop
20
takeProfitPoints
Profit target (points)
30

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
S&P 500Best run4 hours1.71 23577.87960 EUR-343
Gold4 hours1.60 19075.26565 EUR-125
FTSE 100Daily1.37 13286.36873 EUR-525
Brent Crude1 hour1.30 47783.651,983 EUR-1,413
Dow Jones1 hour1.24 43990.212,076 EUR-1,765
USD/JPY1 hour1.15 1,07476.16156,250 JPY-141,305
Gold1 hour1.13 68555.18379 EUR-219
Gold30 min1.10 1,21551.36402 EUR-236
S&P 5001 hour1.09 95664.02493 EUR-482
Brent Crude30 min1.08 1,03378.411,127 EUR-1,078
Brent CrudeDailyn/a 4192.68933 EUR-614
S&P 500Dailyn/a 8381.93439 EUR-176

Charts

Results by run

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

Above 1.0 made money, below 1.0 lost money.

The code

ProBuilder, rewritten to house standard

// ============================================================
// Fractal Breakout
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Breakout
// Direction: Long & short
// Timeframe tested: 4 hours
// ============================================================

// --- Settings ---
DEFPARAM CumulateOrders = true
DEFPARAM PreloadBars = 10000

// --- Parameters ---
positionSize = 1          // contracts per trade
fractalPeriod = 113       // bars on each side of a confirmed swing close
longTrailPoints = 5       // trailing stop distance for longs (points)
shortTrailPoints = 5      // trailing stop distance for shorts (points)
channelPeriod = 20        // Donchian channel used as the protective stop
takeProfitPoints = 30     // profit target (points)

// --- Indicators ---
// A swing close is the extreme of the window centred on it, so it is only
// confirmed fractalPeriod bars later. The level holds until a new swing forms.
isSwingHigh = close[fractalPeriod] >= Highest[2 * fractalPeriod + 1](close)
isSwingLow = close[fractalPeriod] <= Lowest[2 * fractalPeriod + 1](close)

IF isSwingHigh THEN
  breakoutHigh = close[fractalPeriod]
ENDIF
IF isSwingLow THEN
  breakoutLow = close[fractalPeriod]
ENDIF

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.
Read this firstKnown weaknesses3 points
  • The best run on S&P 500 4 hours had 235 trades and made EUR 960.19, a small sample and a small profit.
  • Swing levels are confirmed with a 113-bar delay, so signals can come long after the swing actually formed.
  • Point-based target and trail (30 and 5) do not scale across instruments. On USD/JPY 1 hour the drawdown was JPY 141,304.99 against JPY 156,250 profit.

Questions

About this strategy

Does the Fractal Breakout run in ProOrder?

Yes. The rewritten code is not yet compile-checked, and the stats come from the version tested before the rewrite.

Which markets were profitable?

All eleven rows were positive. Gold 4 hours had a profit factor of 1.6, FTSE 100 Daily 1.37 and Brent Crude 1 hour 1.3.

How much drawdown per contract?

S&P 500 4 hours had a max drawdown of EUR 343.21 at 1 contract. Dow Jones 1 hour went to EUR 1,765.10.

Why such a long fractal period?

113 bars on each side picks out only major swing points, so the system reacts to breaks of meaningful levels instead of minor wiggles.

Related

Strategies like this one

Candle Body Sum Intraday

Best run on the same market, S&P 500.

2.86 PF · 124 trades

SuperTrend CCI

A similar profit factor.

1.72 PF · 561 trades

Breakout Regime Filter

Also a breakout strategy.

6.28 PF · 70 trades

Want to see this idea next to our live systems? Join the ProRealAlgos community waitlist.

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