Join waitlist
Strategies / Breakout / Squeeze Upper Band Breakout

Squeeze Upper Band Breakout

The strategy buys 1 contract when the close breaks above the upper Bollinger Band after a squeeze and above the 200 period EMA. It sells the long when the close breaks below the lower band and the average close position is 0 or below.

BreakoutLong onlyIntradayNikkei 22530 min
1.59Profit factor
47,620Net profit USD
49.83%Win rate
602Trades
-8,861Max drawdown
79.10Avg trade

Best run of 28. Nikkei 225, 30 min, spread 10, from run pf:2026-10-04-NIKKEI-30m.tsv:1.

Entry rules, long

  1. A squeeze means 20 period Bollinger Bands (2 deviations) sit fully inside Keltner bands at 1.5 times the average true range.
  2. A squeeze occurred on the current bar or one of the 3 prior bars.
  3. The 20 bar average of the close's position within the bar's range is above 0.
  4. The close is above the 200 period EMA and above its close 3 bars earlier.
  5. Signals come only after bar 200 and more than 15 bars after the previous signal.

Exit rules

  1. A recent squeeze occurred on the current or one of the 3 prior bars.
  2. The average close position is 0 or below.
  3. Exits also wait more than 15 bars after the previous signal, and apply only while a long position is open.

Test conditions

PeriodUp to 2026-10-04
InstrumentNikkei 225, 30 minutes
Spread10 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
Nikkei 225Best run30 min1.59 60249.8347,620 USD-8,861
USD/JPY30 minn/a 68148.75442,860 USD-251,530
Nikkei 2254 hoursn/a 7848.7236,674 USD-9,021
Dow JonesDailyn/a 4355.8132,957 EUR-11,142
Nikkei 225Dailyn/a 2245.4528,591 USD-23,427
Nasdaq 100Dailyn/a 2360.8715,155 EUR-5,914
Nasdaq 1001 hourn/a 42352.4814,963 EUR-4,516
Nikkei 2251 hourn/a 29845.6414,798 USD-14,665
DAX 40Dailyn/a 2171.4314,099 EUR-5,511
Nasdaq 10015 minn/a 65749.9213,539 EUR-4,536
Silver2 minn/a 62541.1213,330 USD-9,398
Nasdaq 1004 hoursn/a 8254.8812,339 EUR-4,421
Dow Jones15 minn/a 54645.0512,240 EUR-7,132
DAX 4015 minn/a 67845.877,680 EUR-4,084
Nasdaq 10030 minn/a 59048.647,491 EUR-4,915
DAX 405 minn/a 60944.996,763 EUR-2,332
DAX 4030 minn/a 63345.815,249 EUR-4,615
S&P 500Dailyn/a 4560.004,682 EUR-1,190
Dow Jones2 minn/a 65143.783,636 EUR-2,483
S&P 50030 minn/a 58651.373,227 EUR-1,133
GoldDailyn/a 3754.053,159 EUR-809
Gold4 hoursn/a 10347.572,465 EUR-962
S&P 5004 hoursn/a 9565.262,196 EUR-920
Gold15 minn/a 72443.651,525 EUR-995
Gold10 minn/a 69044.491,376 EUR-879
S&P 5001 hourn/a 44146.941,352 EUR-1,348
Gold3 minn/a 72141.191,222 EUR-454
S&P 5005 minn/a 65444.801,099 EUR-545

Charts

Results by run

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

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Squeeze Upper Band Breakout
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Breakout
// Direction: Long only
// Timeframe tested: 30 minutes
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE lastsig = 0

basis = Average[20](close)
dev = 2.0 * STD[20](close)
upperbb = basis + dev
lowerbb = basis - dev
trsma = Average[20](TR(close))
upperkc = basis + trsma * 1.5
lowerkc = basis - trsma * 1.5

30 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

Bollinger BandsKeltner ChannelEMATrue Range
Longer historyRe-run on up to 1,000,000 barsNikkei 225 · 30 min · older data 338.30 USD

Nikkei 225 had no history beyond the standard run, so both runs used 180,000 bars.

Nikkei 225 · 30 min

Bars available180,000
Net, standard 200,000-bar run47,620.30 USD
Net, long run47,958.60 USD
Net on the older data alone338.30 USD
Read this firstKnown weaknesses2 points
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.
  • Results include the spread only. Commissions and overnight financing are not included.

Questions

About this strategy

Can I run Squeeze Upper Band 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 28 market and timeframe combinations. The best run was Nikkei 225, 30 minutes, with a profit factor of 1.59 over 602 trades.

How large was the drawdown?

The best run had a maximum drawdown of 8,861 USD at the tested position size, against a net result of 47,620 USD.

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

Reversal Pattern With Chaikin Volatility

Uses the same indicator.

2.26 PF · 6,872 trades

Rock Climber

Best run on the same market, Nikkei 225.

1.44 PF · 1,644 trades

Volatility Band Upside Breakout

Also a breakout strategy.

1.59 PF · 194 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