Join waitlist
Strategies / Breakout / Volatility Box Breakout

Volatility Box Breakout

The strategy marks a tight, flat 15-bar range as a box, then buys when a close breaks above the box top or sells short when a close breaks below the box bottom. Breakouts are only taken in the direction of the 150-period EMA.

BreakoutLong & shortSwingGold1 hour
n/aProfit factor
1,087Net profit EUR
35.60%Win rate
1,014Trades
-932Max drawdown
1.07Avg trade

Best run of 9. Gold, 1 hour, spread 0.6, from run sweeps:2026-10-04-GOLD-1h-opt.tsv:108.

Entry rules, long

  1. A box is armed when its 15-bar range is under 2.5 times ATR(14) and the scaled 15-bar regression slope is under 0.2.
  2. No new box is armed within 5 bars of the last entry.

Entry rules, short

  1. When flat, a close below the box bottom with close below EMA(150) sells short one contract.

Exit rules

  1. The target is 1.9 times the initial risk, measured from the fill.

Test conditions

PeriodUp to 2026-10-04
InstrumentGold, 1 hour
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-04

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
GoldBest run1 hourn/a 1,01435.601,087 EUR-932
USD/JPYDailyn/a 6946.387,610 USD-1,930
Dow Jones1 hourn/a 37137.207,101 EUR-4,784
Dow JonesDailyn/a 6035.005,903 EUR-3,123
Nasdaq 100Dailyn/a 2250.004,496 EUR-1,570
SilverDailyn/a 3237.503,396 USD-3,030
US Crude OilDailyn/a 2060.003,332 EUR-1,632
Gold4 hoursn/a 11844.071,339 EUR-424
S&P 500Dailyn/a 3844.74874 EUR-210

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Volatility Box Breakout
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Breakout
// Direction: Long & short
// Timeframe tested: 1 hour
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE boxready = 0
ONCE zhigh = 0
ONCE zlow = 0
ONCE boxstart = 0
ONCE lastentry = -999

ema = ExponentialAverage[150](close)
myAtr = AverageTrueRange[14](close)
highline = highest[15](high)
lowline = lowest[15](low)
boxh = highline - lowline
slope = abs(LinearRegressionSlope[15](close) / close) * 1000

34 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

EMAATRLinear Regression
Read this firstKnown weaknesses2 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • The maximum drawdown of 932 EUR is large next to the net profit of 1,087 EUR.

Questions

About this strategy

Can I run Volatility Box 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 9 market and timeframe combinations. The best run by trade count was Gold, 1 hour, with 1,014 trades.

How large was the drawdown?

The best run had a maximum drawdown of 932 EUR at the tested position size, against a net result of 1,087 EUR.

Does it trade long, short or both?

It trades both long and short.

Related

Strategies like this one

Reversal Pattern With Chaikin Volatility

Uses the same indicator.

2.26 PF · 6,872 trades

CCI Breakout

Best run on the same market, Gold.

1.08 PF · 6,065 trades

Big Candle Breakout

Also a breakout strategy.

n/a PF · 4,636 trades

Want strategies that are already part of a live portfolio? Join the ProRealAlgos waitlist.

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