All posts
PublishedByEvidence recordInside barOutside barHaramiBreakoutPrice actionBacktestUSDJPY

Is the Inside Bar Breakout Profitable? 192 Backtests

Inside bar breakout win rates on USD/JPY over two years, measured against the same level cleared with no contained bar before it, plus the fade and the outside bar.

An inside bar sits entirely within the previous bar's high and low. It is read as a pause, and the usual rule is to take the direction in which the following bar clears the bar before the pause. An outside bar is the inverse: one that clears both the previous high and the previous low.

The comparison this needs is obvious once stated. The same level, cleared by the same bar, with the bar before it not contained. If the containment carries information, the two have to differ.

On the hourly chart in 2025, 6,126 bars cleared a two-bar-old high or low. 566 of them, 9.24%, followed a contained bar.

Ten bars later, the break's direction had held for 49.47% of the contained breaks and 50.59% of the rest. In 2024 it reads 47.68% against 51.19%, the same way round.

46%48%50%52%54%15-minute 202515-minute 2024Hourly 2025Hourly 20244-hour 20254-hour 2024share moving the break's way ten bars later
break after an inside barthe same break, uncontainedUSD/JPY, bars grow from 50%
Share of breaks whose close ten bars later had moved the break's way. The contained break came out ahead in two of the six cells, on different charts in different years, and the hourly chart is below its control in both.

What the inside bar and outside bar actually test

Formiq's backtester reads three bars:

  • The mother (two back): the bar whose high and low set the level
  • The contained bar (one back): its high at or below the mother's high, its low at or above the mother's low
  • The breaking bar (now): clearing the mother's high goes long, clearing its low goes short

Highs and lows, wicks included. Bodies play no part.

The outside bar is counted separately here: a bar that clears both the previous bar's high and its low, taken in the direction of its own close.

Only a tenth of breaks come after an inside bar

Counting every bar that cleared a two-bar-old high or low, and splitting out the ones preceded by a contained bar:

TimeframeYearAll breaksAfter an inside barShareOutside bars
15-minute202524498246210.05%2718
15-minute202424132254210.53%2529
Hourly202561265669.24%720
Hourly2024598762510.44%665
4-hour2025155519512.54%220
4-hour2024155219212.37%208

Contained breaks are 9.24 to 12.54% of the total. The other nine in ten clear the same level with the previous bar sticking out of the mother.

Settings and how to add a threshold

Nothing is drawn: the pattern is a position relationship between bars already on the chart.

ConditionNumeric fieldWhat it fires on
Inside bar breakoutnonethe bar before sat inside the one before that, and this bar clears it
Haraminonethis body sits inside the previous body, colour flipped, and smaller

Neither has a numeric field. There is no setting for how tightly the bar has to be contained; it either is or it is not. Filters go beside the condition instead.

What to filter onCondition to addSetting
The breaking bar's body is solidMarubozubody ratio 0.7
The breaking bar's range is largeLarge candleATR multiple 1.5, body ratio 0.5
Take only the side the average pointsMA slopeperiod 50, compared five bars back

The published trading rule

Enter at the close of the breaking bar in the direction of the break. The usual exit is a break of the other side, which is what the condition does here too. The usual stop sits at the far end of the mother bar.

How this was measured

ItemValue
PairUSD/JPY
Timeframes15-minute, hourly, 4-hour
Period1 January 2024 to 31 December 2025
Detectionthe same code the backtest runs, bar by bar
Controlthe same two-bar-old level cleared, with the previous bar not contained
Horizonthe close 1, 5, 10 and 20 bars after the breaking bar
Exitsa break of the other side, and a fixed ten-bar hold
Conditionsfour inside bar, three harami, plus the ten-bar exit: 8
Runs8 conditions x 3 timeframes x 4 windows x with and without cost = 192
Spread0.3 pips, fixed
Lot0.1
Fillat the close

Against the same break, uncontained

TimeframeYearAfter an inside barHit rateUncontainedHit rateDifference
15-minute2025246250.73%2203649.62%+1.11
15-minute2024254248.23%2159049.77%-1.54
Hourly202556649.47%556050.59%-1.12
Hourly202462547.68%536251.19%-3.51
4-hour202519548.21%136049.63%-1.43
4-hour202419251.04%136048.75%+2.29

Two cells of six came out ahead, on different charts in different years. The 15-minute chart is +1.11 then -1.54; the 4-hour chart is -1.43 then +2.29. The hourly chart is negative in both years.

In pips the hourly contained break returned +0.58 and +1.29 against +1.89 and +2.14 for the uncontained one. Both are positive; the contained one is smaller.

What if you fade the break instead?

Selling the up-break and buying the down-break, on exactly the same signals:

TimeframeYearTake the breakFade itTake an ordinary break
15-minute202550.73%49.19%49.62%
15-minute202448.23%51.42%49.77%
Hourly202549.47%50.53%50.59%
Hourly202447.68%52.16%51.19%
4-hour202548.21%51.79%49.63%
4-hour202451.04%48.96%48.75%

Taking the break and fading it are the same trades reversed, so the two columns sum to 100% apart from ties. The fade is ahead of the break in four cells of six.

Against an ordinary break of the same level the fade is also ahead in four cells, by 0.21 points (4-hour 2024) to 2.16 points (4-hour 2025), and behind in the 15-minute and hourly cells of 2025. The four it wins are not the same four in which it beats the break.

So "the inside bar break is a trap, fade it" comes out marginally better than taking the break over these two years, and stays within roughly two points of an ordinary breakout either way.

Two in a row, three in a row, and both ends at once

Splitting by how many bars in a row were contained before the break:

TimeframeYearOneTwoThree or more
15-minute20252248 at 51.11%195 at 44.10%19 at 73.68%
15-minute20242275 at 47.82%246 at 51.63%21 at 52.38%
Hourly2025498 at 49.40%61 at 45.90%7 at 85.71%
Hourly2024537 at 48.04%80 at 45.00%8 at 50.00%
4-hour2025156 at 48.72%34 at 44.12%5 at 60.00%
4-hour2024148 at 51.35%43 at 51.16%1 at 0.00%

The three-or-more column holds between 1 and 21 signals. The hourly 85.71% is six wins out of seven, which decides nothing. Two in a row read lower than one in five cells of six. The longest run of contained bars in the data is five, on the hourly chart in 2024.

A breaking bar can also clear the mother's high and its low on the same bar.

TimeframeYearAfter an inside barCleared both endsShareTaken as a buy
15-minute2025246226210.64%131 at 48.85%
15-minute2024254229211.49%146 at 52.05%
Hourly20255666611.66%33 at 63.64%
Hourly2024625528.32%26 at 50.00%
4-hour20251956231.79%31 at 61.29%
4-hour20241923417.71%17 at 64.71%

Such a bar satisfies the long condition and the short condition at once. A single candle does not record which end was reached first, so the order cannot be recovered. Formiq's backtester checks the long side first, which means every two-ended break is taken as a buy. On the 4-hour chart in 2025 that is 31.79% of contained breaks.

Read as buys, those bars returned between 48.85% and 64.71% on 17 to 146 signals. The direction is a resolution rule rather than a measurement, so treat that column as behaviour to know about rather than as a result.

What the outside bar does differently

Holding the outside bar for ten bars in the direction of its close:

TimeframeYearOutside barsHit rateOrdinary breakHit rate
15-minute2025271848.86%2203649.62%
15-minute2024252950.85%2159049.77%
Hourly202572051.25%556050.59%
Hourly202466550.38%536251.19%
4-hour202522051.82%136049.63%
4-hour202420850.00%136048.75%

Ahead in four cells of six, by between -0.81 and +2.19 points. Like the inside bar, it does not separate from an ordinary break by a margin that holds.

Is a harami the same thing?

Both describe a small bar swallowed by a large one, but they complete on different bars. The harami completes on the contained bar itself; the inside bar breakout completes on the bar after it. They also test different things: bodies with a colour flip against highs and lows.

TimeframeYearSideBoth fired on the same barShare of harami signals
15-minute2025long241.55%
15-minute2025short201.24%
Hourly2025long51.31%
Hourly2025short51.31%
4-hour2025long32.80%
4-hour2025short00.00%

They coincide on 0.91 to 2.80% of harami signals. Similar names, different moments.

Trading all 192 runs

Entering at the close of the breaking bar and exiting on a break of the other side, hourly:

Condition2025 trades2025 win rate2025 net pips2024 trades2024 win rate2024 net pips
inside bar breakout28544.21%+384.930143.19%+699.9
the same, ten-bar exit30451.32%+727.031245.83%-360.4
the same, body ≥ 0.711544.35%+1396.413145.04%-391.9
the same, range ≥ 1.5 ATR3351.52%+554.65451.85%+543.6
the same, 50-MA direction16639.16%-587.818046.11%+309.2
harami42650.23%+62.643250.23%-2007.5
harami, ten-bar exit34447.67%-662.336246.13%-2657.8
harami, 50-MA direction24148.96%-546.224350.62%-1735.9

Two of the eight cleared both years on the hourly chart: the plain breakout and the ATR-filtered one, the latter on 33 and 54 trades.

The 15-minute chart cleared one (the 50-MA direction) and the 4-hour cleared three (the ten-bar exit, the harami, and the harami with the 50-MA direction). Not one condition cleared both years on even two of the three charts.

Splitting 2025 in half

Condition2025Jan-JunJul-Dec
inside bar breakout+384.9+762.0-484.4
the same, ten-bar exit+727.0+440.2+281.3
the same, body ≥ 0.7+1396.4+501.3+787.8
the same, range ≥ 1.5 ATR+554.6+441.7+112.9
harami+62.6-579.4+641.2

The plain breakout finishes 2025 at +384.9 pips with -484.4 of that in the second half. Three of the five were profitable in both halves.

Last year's winner, held through this year

Timeframe2024 winner2024 net pips2025 net pips2025 rank2025 median of 8
15-minuteharami + 50-MA direction+1710.7-348.46th+515.6
Hourlyinside bar breakout+699.9+384.94th+223.8
4-hourinside bar breakout+2999.9-779.66th-134.7

The 15-minute and 4-hour picks landed below the following year's median. The 4-hour breakout went from +2,999.9 pips to -779.6.

Stops, targets and cost

Stop / target2025 trades2025 win rate2025 net pips2024 net pips
none (exit on the other side)28544.21%+384.9+699.9
30 / 6040834.31%-300.4+564.5
60 / 3041054.88%-536.6-68.4
50 / 5039945.36%+80.8-253.6

Hourly inside bar breakout. The 60 / 30 exit produces the highest win rate and loses money in both years. The entries are identical and the win rate runs from 34.31% to 54.88%.

TimeframeConditionTradesSpread paidTrades x 0.3
15-minuteinside bar breakout1184355.2355.2
15-minuteharami1720515.9516.0
Hourlyinside bar breakout28585.585.5
Hourlyharami426127.8127.8
4-hourharami10330.930.9

Spread paid matched trade count times 0.3 pips. The 15-minute harami still returns -485.8 pips at zero spread, so its loss comes from the entry rather than the trade count.

Notes

The data is USD/JPY from 1 January 2024 to 31 December 2025. Fills are at the close, the spread is fixed at 0.3 pips, and the lot is 0.1. Detection uses the same code path as the backtest and reads bars from before the test window. Because the horizons run out to 20 bars, that many bars at the end of each year are excluded. A bar clearing both ends of the mother is counted on both sides in the break-and-fade table and taken as a buy in the backtests. The harami overlap counts bars where both conditions fired in the same direction.

Questions people ask

What is the win rate of the inside bar breakout?
On the hourly chart, the close ten bars after the break had moved the break's way 49.47% of the time in 2025 (566 signals) and 47.68% in 2024 (625). Breaks of the same two-bar-old level where the previous bar was not contained managed 50.59% (5,560) and 51.19% (5,362). Across three timeframes and two years the contained break came out ahead in two cells of six.
What is an outside bar?
A bar that clears both the previous bar's high and its low, which is the inverse of an inside bar. On hourly USD/JPY it appears 665 to 720 times a year, roughly a tenth of all bars that break a two-bar-old level. Traded in the direction of its close for ten bars it wins 48.86 to 51.82%, against 48.75 to 51.19% for an ordinary break.
Should you fade an inside bar breakout instead?
The fade beat the break in four cells of six, but the differences stay small. On the hourly chart the fade reads 50.53% against 49.47% in 2025 and 52.16% against 47.68% in 2024. Measured against an ordinary break of the same level the fade is ahead in four cells by 0.21 to 2.16 points and behind in the other two.
Is a harami the same as an inside bar?
They fire on different bars. The harami completes on the contained bar itself and compares bodies with a colour flip; the inside bar breakout completes on the next bar and compares highs and lows against the bar before the contained one. Both conditions fired on the same bar in the same direction in 0.91 to 2.80% of harami signals.
Can I backtest the inside bar in Formiq?
Yes. The backtest condition list carries an inside bar breakout and a harami, neither with numeric fields. The filters in this article are built by switching on the marubozu, large candle and MA slope conditions beside them.

Formiq is a free browser-based FX terminal with replay practice and no-code backtesting. Open the chart or see what the free plan includes.