The biggest strength of the Inside Bar Breakout strategy is that it teaches a key automation lesson: A visual price action pattern can be reduced to a set of exact rules.

The Inside Bar Breakout strategy is one of the cleanest price action strategies to understand, test, and automate.
The idea is very simple:
It’s so simple and so easy to automate in Profectus AI, yet so many people make it too complicated or overlook the power of these simple rules.
What I really like about this strategy is that there is no predictive element or bias needed to figure out if the price is breaking out to the upside or the downside. With our version of the Inside Bar Breakout, we anticipate a breakout in either direction and just trade which one comes first.
This strategy is based on 2 very simple elements. First, there is the inside bar, and secondly, there is the imbalance. Both are indicators of consolidation and volatility compression and can be derived directly from only looking at the previous candle.
Disclaimer: Templates are for educational purposes only!
👉 Get the Inside Bar Breakout Strategy Automation Template → Inside Bar Breakout Profectus Template
This template is designed to run on the Daily Timeframe.
You might also want to watch the full Youtube video on the Inside Bar strategy here to get an in-depth explanation of the pattern.
We start by looking if price is in consolidation. We made this as simple as we can by simply looking at the previous candle and checking if the body of that candle only makes up a small portion of the total size of that candle. Our specific rule is that the body size can not be bigger than 50% of the total candle size. For example, if the total candle size (from high to low) is 100 pips. Then the body of that candle (from open to close) can not be bigger than 50 pips.
We call this the imbalance candle. We run this strategy on the Daily timeframe, but if we were to move down to a lower timeframe, the imbalance candle shows a consolidating price range.
The second rule we have for this strategy is that we want to see if the imbalance candle we measured earlier is also an inside bar. An inside bar is a candle (or bar, if you like) whose high and low fall within the high and low of the candle before it.
Candle high candle ID 1 < Candle high candle ID 2
Candle low candle ID 1 > Candle low candle ID 2
The total price range of this candle is now compressed within the total price range of the candle before it. Combined with the imbalance characteristics, this represents a perfect consolidation price range that is waiting for a breakout.
Let’s keep it simple and list the trade rules for this strategy one by one so we can build this strategy together in the next step using Profectus AI.
This is what the complete picture looks like on a chart. I have added what it looks like from the Daily timeframe perspective and what the trade looks like on the 15-minute timeframe.

Now, let’s move to Profectus AI to build this amazingly simple strategy so that you can test it for yourself.
Disclaimer: Templates are for educational purposes only!
👉 Get the Inside Bar Breakout Strategy Automation Template → Inside Bar Breakout Profectus Template
This template is designed to run on the Daily Timeframe.
When you open the template, your canvas should look like this.

Let’s go building the strategy block-by-block:
Want to see how this Inside Bar strategy works when fully automated?
Access an enhanced automation template used to turn this trading concept into a deployable MQ5 trading bot inside Profectus. This template has a trade execution module included, so you can start testing it right away!
Disclaimer: Templates are for educational purposes only!
👉 Get the Inside Bar Breakout Strategy Automation Template → Inside Bar Breakout Profectus Template
This template is designed to run on the Daily Timeframe.
We have written a full article to get you started in Metatrader 5 and how you can run any automated strategy, such as the Inside Bar strategy, as an Expert Advisor yourself.
Read the full guide here to run your first trading bot in MT5
Dive into a world of knowledge, trends, and industry updates on the Variable blog. Our curated content covers a spectrum of topics.