Inside Bar V2 Indicator: The Bar And Its Breakout

Written by Dominic Walsh · Published · Last updated

The inside bar v2 indicator does two jobs in one pass. It dots every inside bar it finds, top and bottom. Then it watches the parent bar range for `LookbackBars` bars and marks the close that finally breaks it. The pattern and the resolution get separate marks.

This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from EURUSD H1.

Platforms MT4 (.ex4) + MT5 (.ex5)
Chart window Main price chart
Plots 4: Inside Bar Top, Inside Bar Bottom, BUY Breakout, SELL Breakout
Alerts popup, push notification, email, sound
Inputs 9

What the Inside Bar V2 Indicator draws on the chart

Inside Bar Top and Inside Bar Bottom are dodger blue and tomato dots bracketing each inside bar.

BUY Breakout places a lime arrow where a close cleared the parent high.

SELL Breakout places a red arrow where a close broke the parent low.

Offsets scale with ATR, so all four marks keep their distance on any instrument.

  • Inside Bar Top: arrow, dodger blue, arrow code 119
  • Inside Bar Bottom: arrow, tomato, arrow code 119
  • BUY Breakout: arrow, lime, arrow code 233
  • SELL Breakout: arrow, red, arrow code 234
Inside bar v2 indicator on EURUSD H1 with inside-bar dots and breakout arrows
Inside bar v2 indicator on EURUSD H1 with inside-bar dots and breakout arrows

How the Inside Bar V2 Indicator calculates its values

Finding the inside bar

is_inside needs the current high below the previous high and the current low above the previous low. Both conditions must hold. That is the strict definition, so a bar matching either extreme does not count.

Remembering the parent range

When a breakout candidate appears, the code walks back up to `LookbackBars` `8` bars looking for an inside bar. It then takes the parent high and parent low from the bar before that one. Those two prices are the range being broken.

Confirming the break

A buy needs the current close above the parent high and the previous close at or below it. The sell case mirrors that against the parent low. offset takes `ArrowOffsetATR` `0.5` times ATR at `ATRPeriod` `14`.

How to read the signals

Dots mark compression. Arrows mark what came out of it.

A break more than a few bars after the inside bar is a weaker version of the pattern.

No breakout mark at all means the range held for the full `LookbackBars` window.

The dots use arrow code 119, which is a small round marker rather than a pointer.

Alert channels in this build: popup, push notification, email and sound, one message per closed bar.

`EnableAlerts` ships on with `EnablePopup` delivering the text. `EnablePushNotify`, `EnableEmail` and `EnableSound` all start false. `SoundFile` picks the clip. The breakout test reads two completed closes, so one message follows each closed bar.

Every Inside Bar V2 Indicator input

Core settings

Setting What it does Default
LookbackBars bars after inside bar to wait for breakout close. Bars after an inside bar that a breakout still counts, default `8`. 8
ATRPeriod ATR period for offset spacing. ATR length behind the offsets, default `14`. 14

Display settings

Setting What it does Default
ArrowOffsetATR arrow offset in ATR units. Mark distance in ATR units, default `0.5`. 0.5

Alert settings

Setting What it does Default
EnableAlerts Master switch over the inside-bar breakout alerts, default `true`. on
EnablePopup Terminal dialog on an inside-bar breakout, default `true`. on
EnablePushNotify Mobile push on an inside-bar breakout, default `false`. off
EnableEmail Mail delivery on an inside-bar breakout, default `false`. off
EnableSound Sound playback on an inside-bar breakout, default `false`. off
SoundFile Wav file the breakout alert plays, default `alert.wav`. alert.wav
Inside bar v2 indicator inputs: LookbackBars, ArrowOffsetATR, ATRPeriod
Inside bar v2 indicator inputs: LookbackBars, ArrowOffsetATR, ATRPeriod

Settings that fit your chart

Inside bars need clear bar structure to mean anything. EURUSD H1 is the reference chart, where `LookbackBars` at `8` gives a range eight hours to resolve. On M5 inside bars appear constantly and most break within a bar. On H4 and daily the pattern is rarer and the break carries far more weight.

When the Inside Bar V2 Indicator fails

Inside bars are common, so the chart can carry many dots that never resolve into anything.

The parent range is only two bars wide, which is a small thing to call a range.

A break eight bars later has little to do with the compression that preceded it.

Copy the compiled Inside Bar V2 Indicator file into your MQL4/Indicators folder, and the MT5 build into MQL5/Indicators, then restart the terminal and drag it onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.

Download the Inside Bar V2 Indicator for MT4 and MT5

The zip holds the compiled Inside Bar V2 Indicator build for MT4 and MT5, plus a short README. Compiled files only, no source. Enter your email below and the download link arrives in your inbox.

Download this indicator free

Enter your email and the file is yours. You also get the full MT4 and MT5 library.

  • 1,380+ indicators
  • MT4 and MT5 files
  • No spam, unsubscribe any time

FAQ

What does LookbackBars at 8 control?

How long a parent range stays live. The code searches back up to eight bars for an inside bar before it accepts a breakout close. Set it lower for a tighter link between the compression and the break, or higher to catch slower resolutions.

Why does ArrowOffsetATR scale the marks?

So the same setting works everywhere. A fixed point offset that looks right on EURUSD vanishes behind a gold candle. At `0.5` every mark sits half a typical bar away, whatever instrument and timeframe you attach it to.

What do the Inside Bar Top and Bottom dots mean?

They bracket a bar whose whole range sits inside the one before it. The dodger blue dot goes above and the tomato dot below, both offset by a quarter ATR. Together they make the compression easy to spot on a busy chart.

Does the BUY Breakout need the parent high, not the inside bar high?

The parent high, which is the bar before the inside bar. That larger range is what the pattern is about. Breaking the inside bar high alone would be a much smaller move and would trigger far more often.

Are results guaranteed?

No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Inside Bar V2 Indicator as one input. Always backtest before trading live.

Category: this is part of our Signal and Forecast collection. Also, truly, browse more Signal and Forecast for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.

External references

Dominic Walsh - Forex trader and MT4/MT5 developer

About the author

Written by Dominic Walsh, a Forex trader and MT4/MT5 indicator, Expert Advisor and script developer. Every tool on forexmt4systems.com is tested on live charts before release and ships with ready-to-use compiled MT4 (.ex4) and MT5 (.ex5) files. Learn more about the trader and developer behind this site.

How we build, test and correct every tool: Editorial & Testing Policy. Trading carries risk; see the disclaimer.

Leave a Comment