Trading Gold with Profectus.AI
The Inside Bar Breakout is a classic price action strategy that looks for market consolidation followed by a breakout.
When a candle forms fully inside the range of the previous candle, it signals reduced volatility and builds pressure for the next move.
This bot detects those setups automatically and places breakout orders both ways, with built-in risk management.
Step 0: Access the Trading Bot Template [1 Min]
Click the button to load the trading bot directly onto your canvas:
Your canvas should display 17 blocks as shown below. Check? Let's continue!
Step 1: Export the Trading Bot [1 Min]
Before diving into customization, export the bot with the upper right export button to download the file.
Step 2: Upload to MetaTrader 5 [4 Min]
Don’t know how? Refer to our help article "Exporting Your First Strategy".
Step 3: Understand the Logic [1 Min]
This strategy is built around the Inside Bar pattern, a classic sign of consolidation before breakout.
Candle ID 1 = the most recently closed candle.
Candle ID 2 = the candle before it.
The Inside Bar forms when:
High(1) < High(2)
Low(1) > Low(2)
This means candle 1 is fully “inside” candle 2’s range — a pause in price action often followed by a sharp move.
How the bot trades it:
Runs daily at 02:00.
Checks if it’s a weekday (split into Mon vs Tue–Fri for broker weekend candles).
Confirms Inside Bar logic with two trade rules.
Ensures no more than 5 trades are open.
Places a buy stop at the Inside Bar’s high and a sell stop at the Inside Bar’s low.
Stop-loss = 0.5% of current price.
Take-profit = 5x stop-loss (R:R = 1:5).
This way, whichever direction the breakout comes, the bot is ready.
Management Logic
The system includes a built-in lock-in profit management style:
Trades are selected and checked one by one.
Once profit reaches 1R, the stop-loss is moved to secure 1R.
Trade then plays out from there.
This ensures winning trades can’t turn back into losers.
Step 4: Make It Your Own [10 Min]
Here are a few ideas to test and adjust:
Change the start time (e.g. 01:00 instead of 02:00).
Adjust risk size (default = 0.5% per trade).
Modify the R:R ratio (e.g. 1:3 instead of 1:5).
Swap lock-in management for trailing stop or candle-high/low management.
Try it on other timeframes (e.g. 4H) or symbols (indices, forex majors).
👉 Always EXPORT and re-test after each change. Outcomes will shift.
Conclusion
The Inside Bar Breakout strategy is a clean way to catch volatility after consolidation.
It’s simple: detect an inside bar, place breakout orders, cap risk, and let profit management handle the rest.
A great foundation to understand price action bots — and to customize further inside Profectus.AI.
Templates are for educational purposes only.
Now it's your turn—apply the template, tweak the logic, and make it yours. 🚀


