Inside Bar Breakout Map
- Indicadores
- Versão: 1.0
- Ativações: 5
# Inside Bar Breakout Map - Compression with ready levels
*Category: Pattern Recognition | Difficulty: beginner | Window: chart window (overlaid on price) | Markets: Universal (Forex, indices, commodities, crypto, stocks) | Suggested timeframes: M15, M30, H1, H4, D1*
## Short description
> Counts consecutive inside bars and draws the two breakout levels of the mother bar, holding them fixed while the pattern is active.
## Full description
### Overview
An inside bar, entirely contained within the previous bar range, is a pause: the market stopped expanding and is compressing. More consecutive inside bars compress more, and the break that follows tends to be proportionally wider, because the energy accumulated during the pause discharges all at once. This indicator counts consecutive inside bars, locates the mother bar the sequence started from, and draws its two extremes as breakout levels, holding them fixed while the pattern is active. The levels are directly usable for pending orders, and that is the practical reason the pattern is so popular with price action traders: it requires no interpretation, just two orders placed above and below.
### How the calculation works
1. A bar is inside when its high does not exceed the previous high and its low does not fall below the previous low.
2. When an inside bar is recognised, the indicator scans back counting how many are consecutive.
3. The mother bar is the one immediately preceding the first inside bar of the sequence.
4. Its two extremes become the breakout levels and stay fixed for the entire duration of the pattern.
5. A break requires a close beyond the level by at least InpBreakAtr times the ATR, to exclude marginal overshoots.
6. The pattern expires after InpMaxAge bars without a break, because a compression lasting too long loses its meaning.
### How to use it
- Place two pending orders on the two levels and let the market choose the direction.
- The natural stop is on the opposite level, because a break one way disproves the other.
- Sequences of several inside bars produce greater compression: raise InpMinInside to select them.
- The arrow on the break confirms the level was exceeded with margin, not merely grazed.
- On high timeframes the pattern is rarer but also more significant: on D1 an inside bar is a notable event.
### Who it is for and on which timeframes
It suits anyone, including beginners: the inside bar definition is purely geometric and requires no interpretation. It works on all timeframes from M15 up. It is particularly practical because it produces immediately usable levels rather than signals to interpret. On low timeframes inside bars are frequent and raising the minimum threshold is advisable, otherwise the pattern triggers too often.
### Practical example of reading a signal
On USDJPY H4 three consecutive inside bars form within a mother bar with a ninety pip range. The two levels are drawn at the mother bar extremes and stay still for the next six bars, while price keeps compressing. The trader leaves a buy order above and a sell order below, with reciprocal stops. On the eighth bar price breaks downwards with a close well beyond the required margin: the red arrow appears, the sell order is filled and over the next twelve bars price covers more than twice the mother bar range.
## Input parameters
| Parameter | Default | Description |
|---|---|---|
| `InpMinInside` | 1 | Minimum inside bars to activate the pattern. With one it triggers immediately, with three it requires extended compression. |
| `InpMaxAge` | 15 | Maximum pattern validity in bars. Beyond this limit the compression loses meaning and the levels disappear. |
| `InpAtrPeriod` | 30 | ATR period used for the break margin and to place the arrows. |
| `InpBreakAtr` | 0.15 | Margin beyond the level to confirm the break, in ATR. It excludes marginal overshoots. |
| `InpArrowShift` | 0.70 | Distance of the arrows from price, in ATR. Purely cosmetic. |
## Advantages / strengths
- It produces levels immediately usable for pending orders, with no interpretation required.
- The pattern definition is purely geometric and therefore completely objective.
- Counting consecutive inside bars separates brief compressions from extended ones.
- Automatic expiry prevents stale levels from remaining drawn out of inertia.
## Limitations and warnings
- Inside bar breaks often fail, especially on low timeframes where the pattern is frequent.
- It does not indicate which direction is more likely: the choice is left entirely to the market.
- It shows one pattern at a time: if a new one forms during the wait, the previous is lost.
- The strict inside bar definition excludes bars with identical extremes, which some traders include.
**No repaint:** values printed on a closed bar are never modified afterwards.
**Disclaimer.** This product is a technical analysis tool, not an automated trading system, and it offers no profit guarantee whatsoever. Financial markets carry the risk of total loss of the invested capital. Past performance is not indicative of future results. Every signal must be confirmed with your own analysis, a money management plan and prior testing on a demo account. The author is not responsible for trading decisions taken on the basis of this indicator.
## Suggested tags / keywords for MQL5
`inside bar`, `breakout`, `compression`, `price action`, `pending orders`, `pattern`, `no repaint`, `levels`
