Strategies

Inside Bar Breakout: 72-Month Test and a Free MT5 Robot

Anton Rozhnovsky · October 27, 2026 · 10 min read
Inside Bar Breakout: 72-Month Test and a Free MT5 Robot

The inside bar is the “cleanest” pattern in price action: one candle sits completely inside the previous one, the market has compressed, and a move is coming. In my manual trading, almost all entries come from an inside bar, but on the retest of a level. Here I tested the pure mechanical version, with no levels: you place orders at the breakout and let the market choose the side. A robot for MetaTrader 5, 72 months of history, seven instruments. In five of the seven, the classic version loses money. But on gold D1 the pattern passed the forward test more solidly than any strategy from my previous analyses. All the numbers are below; the robot is at the end of the article.

Inside bar breakout strategy: an honest 72-month test and a free robot for MetaTrader 5

The strategy rules

An inside bar is a candle whose high is below, and whose low is above, those of the previous candle (the “mother bar”). Toby Crabel described these compression days as the preparation for a strong move, and in price action the pattern became a classic. The mechanical version I tested:

It is a breakout strategy: unlike mean reversion with Bollinger, it wins when, after the compression, the market really starts to move.

What it looks like on the chart

Below are two real trades from the robot, from the gold D1 test with the optimized parameters. The first shows how the pattern is supposed to work; the second, how it most often breaks down.

Example of a winning inside bar breakout trade on GOLD D1: entry, stop loss, take profit and exit

Winning trade. On December 30, 2024, the mother bar forms (high 2628.21, low 2596.04). On December 31, the inside bar: its high of 2627.61 and its low of 2602.58 sit completely inside the mother bar. Price is above the EMA 100, so we only look for buys: Buy Stop at the inside bar’s high, 2627.61. On January 2 the order was triggered. Stop loss below the mother bar, at 2596.04; take profit three times farther away, at 2722.32. The target was reached on January 16: +$379.

Example of a losing inside bar breakout trade on GOLD D1: false breakout and stop loss exit

Losing trade. February 14, 2025: mother bar (2940.05–2877.01); February 17: inside bar (2906.36–2878.69). On February 18 price broke the high and the Buy Stop was triggered at 2906.36. But the market did not keep rising: for more than a week gold churned near the top, and on February 27 it dropped below the mother bar and hit the stop at 2877.01: −$117. That is what a false breakout looks like. That is why the take profit is three stops: one winning trade covers three losses like this one.

Doing it by hand is exactly the same: wait for the daily close, look for a candle inside the previous one, check which side of the EMA 100 price is on, and place a single pending order with its stop loss and take profit. If it isn’t triggered within a day, delete it.

How I ran the test

I explain at the end why 72 months and not 10 or 20 years. Three blocks: the classic with no adjustments → optimization only on 10/2020–09/2024 → verification on 10/2024–09/2026, months the optimizer never saw.

Block 1. The classic over 72 months: positive only on gold and the yen

Inside bar breakout: classic on D1 across 7 instruments over 72 months (10/2020–09/2026)
Instrument (D1) Result over 72 months Profit factor Max. drawdown Winning trades Swaps
GOLD +$353 1.06 10.7% 36% −$260
USDJPY +$101 1.01 10.7% 36% −$266
EURUSD −$549 0.92 21.6% 34% −$484
WTI (oil) −$1,117 0.70 18.4% 31% −$1,411
USDCHF −$1,238 0.83 19.8% 32% −$636
BITCOIN −$1,258 0.84 15.8% 31% −$764
GBPUSD −$1,684 0.77 25.6% 29% −$297

Around 100 trades in each market: the sample is enough. And it is harsh:

Block 2. Optimization on 10/2020–09/2024

I optimized three variants: gold D1, gold H4 and USDJPY D1. I tuned the trend filter (EMA from 0 to 200), where to enter (inside bar or mother bar), where to place the stop loss, the take profit from 1 to 3 stops, order lifetime, a forced exit after N bars, the offset from the level, and sells.

For gold D1 I chose the set that departs the least from the classic, with just two changes:

Parameter Classic Optimization (GOLD D1)
Trend filter none EMA 100: buys above, sells below
Take profit 2 stops 3 stops
Entry at the inside bar extremes at the inside bar extremes
Stop loss beyond the mother bar beyond the mother bar
Order lifetime 1 bar 1 bar
Direction buys and sells buys and sells

Block 3. Forward 10/2024–09/2026

Inside bar breakout on GOLD D1: optimization on 10/2020–09/2024 and forward test on 10/2024–09/2026
Variant Period Result Profit factor Max. drawdown Trades
Classic 10/2020–09/2024 +$97 1.03 8.9% 62
Optimization 10/2020–09/2024 +$2,323 1.63 11.9% 63
Classic 10/2024–09/2026 (forward) +$103 1.04 10.9% 42
Optimization 10/2024–09/2026 (forward) +$2,369 2.84 5.0% 28

Each period was tested separately, starting with $10,000. The result:

MetaTrader 5 tester report: inside bar breakout on GOLD D1, optimized parameters

The risks, without makeup

Where to run the robot

The robot works on MetaTrader 5 with any broker that offers gold (GOLD/XAUUSD). My test was run on FxPro. The other brokers in my ranking also work: RoboForex and Tickmill. Before launching it, compare gold swaps: over this holding distance they take a noticeable part of the profit.

Download the “Inside Bar” robot for free

The robot is free for clients of the brokers in my ranking:

  1. Open a MetaTrader 5 account with one of the brokers above (or use the one you already have).
  2. Go to the Telegram bot with the button and send your account number.
  3. After verification, the bot sends you the file: the robot, the classic inside bar breakout parameters and those optimized for GOLD D1, plus the instructions.

📊 Download the robot for free on Telegram

My conclusion

The pure inside bar breakout, in five of seven markets, is a stop-collecting machine. Compression by itself promises nothing: the market can shoot off in either direction, or simply churn and take you out both ways. Anyone who trades the “textbook” pattern with no context is paying the market.

But add a single condition, the direction of the trend, and on gold D1 the pattern becomes a system that passed the forward test better than training, along with 95 of 98 neighboring sets. The inside bar works when it is clear which way the majority is pushing. If you keep optimizing the robot consistently, you can keep it in shape: the optimized .set shows what result that approach gives.

Today I also published the analysis of MACD + EMA 200: the classic from the videos doesn’t work anywhere, but the reworked version also found its money in gold. Other analyses: the Turtles, the classic channel breakout, the “golden cross” and Bollinger Bands.

Why 72 months?

The market changes fundamentally every 3–5 years: participants and volatility change, and trends give way to ranges. This test shows it clearly. The classic inside bar on gold spent four years going nowhere: in 2020–2023 gold moved in a wide range and breakouts fizzled out. Since 2024 the market is different, and the breakout in the direction of the trend started to pay. If you test a strategy over 10–20 years, those different markets blend into an average figure that says nothing about what works today. The market changed: change the strategy.

To find strategies for the current market I use my app “Find your strategy”, in the browser or on Telegram. Any idea, even this very inside bar, can be tested there on up to 72 months of history, and every 2 weeks the app automatically runs tens of thousands of strategies and shows you the ones that work over the last 6, 12 and 36 months. It doesn’t promise profits: it shows you what works now and what was left behind in the previous cycle.

Backtest results do not guarantee future results.

Sources

Where to trade

These are the brokers and exchanges I use that work with clients from Latin America. Always check that the service is available in your country and start small.

Dónde opero y qué recomiendo
Brokers de Forex y CFD
1
FxPro
Broker con historia desde 2006 y uno de los nombres más conocidos del mercado. Ejecución rápida y muchas plataformas.
MT4MT5cTraderFxPro App
Abrir cuenta
2
RoboForex
Depósito de entrada bajo y muchos tipos de cuenta. Buena opción para empezar con poco capital.
MT4MT5R StocksTraderCopyFX
Abrir cuenta
3
Tickmill
Spreads bajos y comisiones competitivas. Pensado para quien opera seguido y cuida cada pip.
MT4MT5Spreads bajos
Abrir cuenta
Exchanges de criptomonedas
1
Bybit
Uno de los mayores exchanges de derivados cripto. Futuros, spot y copy trading en una sola cuenta.
FuturosSpotCopy trading
Abrir cuenta
2
BingX
Exchange muy fuerte en copy trading: puedes seguir a traders y ver sus resultados.
Copy tradingFuturosSpot
Abrir cuenta
3
KuCoin
Exchange con cientos de criptomonedas y muchas altcoins. Spot, futuros y bots de trading en una sola cuenta.
SpotFuturosBots de trading
Abrir cuenta
Los enlaces son de afiliado: si abres una cuenta, puedo recibir una comisión sin costo para ti. Operar con CFD, Forex y criptomonedas apalancadas conlleva un alto riesgo de perder dinero. Revisa si el servicio está disponible en tu país y opera solo con dinero que puedas permitirte perder.
Want my 4 indicators for MT5 free for 30 days? Open an account with a trusted broker, send the number to the Telegram bot and get them. No deposit.

Risk warning: CFDs, Forex and crypto derivatives carry a high risk of losing money due to leverage. This article is not investment advice.

Anton Rozhnovsky
Anton Rozhnovsky

Trader for 14 years. He has automated and tested more than 2,000 strategies in trading robots and develops his own indicators for MetaTrader 5.

← PreviousMACD + EMA 200 Strategy: 72-Month Test and Free MT5 Robot

Keep reading

TITAN Strategy: Long-Term Investing and Intraday Trading in a Single Account
Strategies

TITAN Strategy: Long-Term Investing and Intraday Trading in a Single Account

Buy and hold, upgraded: long-term positions on W1 plus intraday trading on H1 and M5, with an 80/20 capital split.

Engulfing in Focus: A Simple Strategy Without Indicators
Strategies

Engulfing in Focus: A Simple Strategy Without Indicators

The engulfing pattern on D1 against the trend of the last 20 candles: entry, stop loss, take profit at the 261.8 Fibonacci level, and trailing stop.

London First Hour: 72-Month Test and Free MT5 Robot
Strategies

London First Hour: 72-Month Test and Free MT5 Robot

I tested the London first-hour breakout over 72 months in MT5: losses in 6 of 7 markets and a fragile positive result in USDJPY. Free robot for research.