Join today
Strategies / Breakout / Inside Bar Breakout

Inside Bar Breakout: Trading Out of Compression

After an inside bar, the system buys a close above its high or sells a close below its low. It exits on a close through the 5-bar low or high, or at a 1% stop.

BreakoutLong & shortIntradayNasdaq 10015 min
n/aProfit factor
-31,620Net profit EUR
30.64%Win rate
7,858Trades
-32,200Max drawdown
-4.02Avg trade

Best run of 16. Nasdaq 100, 15 min, spread 3, from run sweeps:2026-09-07-NAS100-15m-opt.tsv:19.

Entry rules, long

  1. The previous bar is an inside bar (lower high and higher low than the bar before it)
  2. Members only
  3. No position is open

Entry rules, short

  1. The previous bar is an inside bar
  2. Members only
  3. No position is open

Exit rules

  1. Stop loss at 1% from entry
  2. Members only
  3. Close a short when price closes above the highest high of the previous 5 bars

Test conditions

PeriodUp to 2026-09-07
InstrumentNasdaq 100, 15 minutes
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-07

Parameters

positionSize
Contracts per trade
1
channelPeriod
Exit channel length
5
stopLossPct
Protective stop, percent of entry price
1

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
Nasdaq 100Best run15 minn/a 7,85830.64-31,620 EUR-32,200
DAX 401 hourn/a 4,77331.761,515 EUR-10,979
Gold5 minn/a 6,59429.71-3,209 EUR-3,365
Gold15 minn/a 6,73529.55-3,448 EUR-4,234
Gold1 hourn/a 4,99329.84-3,636 EUR-3,944
S&P 5001 hourn/a 4,67329.19-3,735 EUR-5,260
Gold30 minn/a 7,33729.63-3,850 EUR-4,533
S&P 50030 minn/a 6,35630.38-6,829 EUR-6,927
S&P 50015 minn/a 6,98929.93-7,578 EUR-7,685
Nasdaq 1001 hourn/a 5,09628.36-8,351 EUR-12,486
S&P 5005 minn/a 6,77528.10-9,128 EUR-9,173
Nasdaq 10030 minn/a 7,21229.45-16,800 EUR-17,754
DAX 4030 minn/a 7,68631.85-17,896 EUR-18,885
Nasdaq 1005 minn/a 7,45230.66-28,571 EUR-28,910
DAX 405 minn/a 7,33829.38-30,467 EUR-30,544
DAX 4015 minn/a 7,70630.48-30,555 EUR-31,256

Charts

Results by run

Net profit against max drawdown

Net profitMax drawdown
0-50K-25K1K2KDAX 40 · 1 hourGold · 5 minGold · 15 minGold · 1 hourS&P 500 · 1 hourGold · 30 minS&P 500 · 30 minS&P 500 · 15 minNasdaq 100 · 1 hourS&P 500 · 5 minNasdaq 100 · 30 minDAX 40 · 30 minNasdaq 100 · 5 minDAX 40 · 5 minDAX 40 · 15 minNasdaq 100 · 15 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 Bar Breakout
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Breakout
// Direction: Long & short
// Timeframe tested: 15 minutes
// ============================================================

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

// --- Parameters ---
positionSize = 1          // contracts per trade
channelPeriod = 5         // exit channel length
stopLossPct = 1           // protective stop, percent of entry price

// --- Indicators ---
// Previous bar sits fully inside the bar before it
insideBar = high[1] < high[2] AND low[1] > low[2]
// Exit channel as of the previous bar, so the current bar cannot move it
channelHigh = Highest[channelPeriod](high)[1]
channelLow = Lowest[channelPeriod](low)[1]

26 more lines: the entry and exit rules.

Read this first

Known weaknesses

  • Every run but one lost money. The only winner was DAX 40 1 hour at EUR 1,514.80, with a EUR 10,978.70 drawdown.
  • The keyStats run on Nasdaq 100 15 minutes ended at EUR -31,619.90 across 7,858 trades.
  • Win rates stayed near 30%, which the tight channel exit does not make up for.
  • Profit factor was not recorded because only sweep data exists, and stats come from the pre-rewrite code.

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

Will it run in ProOrder?

Yes, it is a one position at a time system with 1 contract and a 1% stop, but the tested results do not support running it live.

What were the results per market?

Gold, S&P 500, Nasdaq 100 and DAX 40 were tested from 5 minutes to 1 hour. Gold ended between EUR -3,209.20 and EUR -3,850.30, and DAX 40 15 minutes at EUR -30,555.40.

How big were drawdowns?

At 1 contract the Nasdaq 100 15 minute run had a maximum drawdown of EUR 32,199.60.

Why try it intraday?

Inside bars are common on short charts, which gives a large sample. The sample here shows the plain breakout lost on nearly every combination.

Related

Strategies like this one

Negated Hammer

Best run on the same market, Nasdaq 100.

3.20 PF · 372 trades

Breakout Regime Filter

Also a breakout strategy.

6.28 PF · 70 trades

Bollinger Band Walk

Also a breakout strategy.

3.10 PF · 148 trades

Looking for breakout rules that did better? The ProRealAlgos waitlist is open.

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