- Strategy
- After an inside bar closes, it places a buy stop above the mother-bar high and a sell stop below the mother-bar low. The first order to fill cancels the other, and unfilled orders expire after a set number of bars.
- Risk model
- 1% of balance per trade (configurable), stop-loss at the opposite mother-bar extreme on every order, one position at a time
What it does
An inside bar is a candle whose whole range sits inside the previous candle, called the mother bar. It shows a pause in which neither side pushed price beyond the earlier extremes. Inside Bar Breakout EA places stop orders on both sides of the mother bar and lets the market choose the direction.
How it works
On every new bar:
- Pattern: the last closed bar's high is below the previous bar's high and its low is above the previous bar's low.
- Size filter: the mother bar's range must be between 0.6 and 2.5 × ATR(14).
- Orders: a buy stop at mother high + buffer and a sell stop at mother low − buffer, where the buffer is 0.05 × ATR.
- Stops: the buy stop's stop-loss sits at the sell entry and the sell stop's stop-loss sits at the buy entry, so each trade risks the full mother-bar range plus two buffers.
- Target: 1.5 × that stop distance.
- One trade: when either order fills, the other is deleted immediately.
- Expiry: unfilled orders are deleted after 3 bars, and at the end of the trading hours.
Expiry is handled by the EA from each order's placement time, so it works even with brokers that do not accept specified expiry times. See candlestick patterns for more on reading bar structure.
How to use it
Inside bars on H4 and D1 carry more meaning than on low timeframes. If you have a directional view, disable one side so only the buy stop or only the sell stop is placed. You can preview the risk of a mother bar's range with the Position Size Calculator.
Settings
| Input | Default | What it changes |
|---|---|---|
| Entry/stop buffer (x ATR) | 0.05 | Distance beyond the mother bar |
| Min / Max mother-bar range (x ATR) | 0.6 / 2.5 | Size filter |
| Reward:risk target | 1.5 | Take-profit, 0 disables it |
| Order expiry (bars) | 3 | Lifetime of pending orders |
| Place buy stop / sell stop | true / true | Direction choice |
| ATR period | 14 | Volatility for filters and management |
| Risk per trade / Fixed lots | 1.0% / 0 | Position sizing |
| Max spread / Trading hours | 30 / 7–20 | Filters |
| Break-even / Trailing | on / off | Stop management |
Limitations
Breakouts from inside bars often fail and reverse, and the stop at the opposite extreme makes each loss relatively wide. In a fast gap both orders could fill before the EA reacts; it then closes the newer position, which can cost a spread or more. Pending orders can fill with slippage.
Before you run it live
Test it in the Strategy Tester with real-tick data, since pending-order fills depend on intrabar movement, then run it on a demo account. Check that your broker allows stop orders at the distances used and keep the risk per trade small. Past behavior does not guarantee future results.

