Join today
Strategies / Volatility / Inside Day NR2 Squeeze

Inside Day NR2 Squeeze: Breaking Out of Tight Bars

It waits for an inside bar whose range is the narrowest of the last 2 bars, while Bollinger Band width is at a 17-bar low. ADX(10) must be above 17 and ATR(1) above ATR(9). Stop orders go 1.5 above and below the bar, with ATR based stop, target and trailing stop.

VolatilityLong & shortSwingUS Crude Oil1 hour
n/aProfit factor
2,602Net profit EUR
52.54%Win rate
118Trades
-1,047Max drawdown
22.05Avg trade

Best run of 10. US Crude Oil, 1 hour, spread 3, from run sweeps:2026-09-17-CRUDE-1h-opt.tsv:2.

Entry rules, long

  1. Inside bar whose range is below the lowest range of the prior 2 bars
  2. Members only
  3. ADX(10) above 17 and ATR(1) above ATR(9)
  4. No position is open
  5. Buy stop 1.5 above the bar high

Entry rules, short

  1. Same setup as the long side
  2. Members only

Exit rules

  1. Stop loss of 2.7 x ATR(14) points
  2. Profit target of 7.2 x ATR(14) points
  3. Members only

Test conditions

PeriodUp to 2026-09-17
InstrumentUS Crude Oil, 1 hour
Spread3 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-17

Parameters

positionSize
Contracts per trade
1
narrowLookback
Bar range must be below the lowest range of this many prior bars
2
bandPeriod
Bollinger Band width length
20
squeezeLookback
Band width must be below its lowest of this many prior bars
17
adxPeriod
ADX length
10
adxThreshold
Minimum ADX
17
fastAtrPeriod
Short ATR that must exceed the longer one
1
slowAtrPeriod
Longer ATR for that comparison
9
entryOffset
Stop entry distance beyond the bar high / low
1.5
atrPeriod
ATR length for stops, targets and trailing
14
longTrailAtr
Long trailing distance in ATRs
2.5
shortTrailAtr
Short trailing distance in ATRs
1.7
stopAtrMultiple
Protective stop in ATRs
2.7
targetAtrMultiple
Profit target in ATRs
7.2

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
US Crude OilBest run1 hourn/a 11852.542,602 EUR-1,047
Silver4 hoursn/a 922.224,120 USD-3,011
Nikkei 22515 minn/a 7953.162,091 USD-1,596
Nikkei 225Dailyn/a 366.671,888 USD-1,776
Brent Crude10 minn/a 8548.241,329 EUR-383
SilverDailyn/a 666.67669 USD-596
FTSE 10015 minn/a 10650.94440 EUR-285
Brent Crude5 minn/a 5855.17320 EUR-273
Gold30 minn/a 2762.9681.40 EUR-49.60
Gold5 minn/a 2161.9068.70 EUR-53.70

Charts

Results by run

Net profit against max drawdown

Net profitMax drawdown
0-5K-3K3K5KSilver · 4 hoursUS Crude Oil · 1 hourNikkei 225 · 15 minNikkei 225 · DailyBrent Crude · 10 minSilver · DailyFTSE 100 · 15 minBrent Crude · 5 minGold · 30 minGold · 5 min

The code

ProBuilder, rewritten to house standard

Every file in the library uses the same header, the same section order and the same variable names. The numbers above were produced by the original version before the rewrite, and the rewrite has not yet been compiled in ProRealTime.

// ============================================================
// Inside Day NR2 Squeeze
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Volatility
// Direction: Long & short
// Timeframe tested: 1 hour
// ============================================================

// --- Settings ---
DEFPARAM CumulateOrders = false

// --- Parameters ---
positionSize = 1          // contracts per trade
narrowLookback = 2        // bar range must be below the lowest range of this many prior bars
bandPeriod = 20           // Bollinger Band width length
squeezeLookback = 17      // band width must be below its lowest of this many prior bars
adxPeriod = 10            // ADX length
adxThreshold = 17         // minimum ADX
fastAtrPeriod = 1         // short ATR that must exceed the longer one
slowAtrPeriod = 9         // longer ATR for that comparison
entryOffset = 1.5         // stop entry distance beyond the bar high / low
atrPeriod = 14            // ATR length for stops, targets and trailing
longTrailAtr = 2.5        // long trailing distance in ATRs
shortTrailAtr = 1.7       // short trailing distance in ATRs
stopAtrMultiple = 2.7     // protective stop in ATRs
targetAtrMultiple = 7.2   // profit target in ATRs

// --- Indicators ---
// Inside bar with the smallest range recently, inside a Bollinger squeeze.
narrowInsideBar = high < high[1] AND low > low[1] AND Range < Lowest[narrowLookback](Range)[1]
bandSqueeze = BollingerBandWidth[bandPeriod](close) < Lowest[squeezeLookback](BollingerBandWidth[bandPeriod](close)[1])
adxValue = ADX[adxPeriod]
atrValue = AverageTrueRange[atrPeriod](close)
longTrailDistance = atrValue * longTrailAtr
shortTrailDistance = atrValue * shortTrailAtr

37 more lines: the entry and exit rules.

Read this first

Known weaknesses

  • Profit factor was not recorded because only sweep data exists.
  • Trade counts are low: 118 on the best run, 9 on Silver 4 hours and 3 on Nikkei 225 Daily.
  • Gold runs barely made money, EUR 81.4 on 30 minutes and EUR 68.7 on 5 minutes.
  • Many filters (narrow range, squeeze, ADX, ATR) cut the signal count, so results can shift a lot when one setting changes.

Indicators used

Bollinger BandsADXATR

How to load it

  1. Copy the code with the copy button above 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.

Questions

About this strategy

Can this squeeze setup run in ProOrder?

Yes. It places two stop entries per setup bar and ATR based exits, all of which ProOrder supports. Compile-check the rewritten code on demo first.

Which instruments were tested?

US Crude Oil 1 hour was the best with EUR 2,602.4. Nikkei 225 15 minutes made USD 2,090.6 and Brent Crude 10 minutes EUR 1,329.4.

What drawdown to expect with 1 contract?

The best run had a max drawdown of EUR 1,047.0. Silver 4 hours dropped USD 3,010.5 on only 9 trades.

Why a 1 hour chart?

Inside bars and squeezes need enough bars per week to appear. On 1 hour crude oil the setup produced 118 trades, while Daily charts produced only a few.

Related

Strategies like this one

Bollinger Squeeze

Uses the same indicator.

14.30 PF · 86 trades

Vectorial Slope

Best run on the same market, US Crude Oil.

1.76 PF · 268 trades

Volatility Breakout

Also a volatility strategy.

1.39 PF · 475 trades

Learn how others filter volatility squeezes. Join the ProRealAlgos community 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