Inside Bar
An Inside Bar is a bar whose high is lower and whose low is higher than the bar before it. The bar is contained by its predecessor and marks a pause — a compression of the range, often before an expansion.
Role in the strategy
| Slot | Available | Role |
|---|---|---|
| Entry Point | No | — |
| Entry Rule | Yes | Filters entries: allows or denies opening a position. |
| Exit Point | No | — |
| Exit Rule | Yes | Triggers exits: allows or denies closing a position. |
The formation produces a condition, not an order price, so it is a rule indicator: as an entry rule it is ANDed with the entry point and the other entry rules, as an exit rule it is ORed with the other exit rules. See Indicators for the slot semantics.
Logic rules
| Rule | Long signal is 1 when | Short signal is 1 when |
|---|---|---|
| There is an Inside Bar formation | the previous bar is inside the bar before it | the previous bar is inside the bar before it |
Both directions carry the same signal: an inside bar is neither bullish nor bearish on its own, it only says the range contracted. Combine it with a directional rule (a Moving Average rise, a Candle Color, a Level line) to turn it into a trade.
The line is an event: the formation happens on isolated bars, which makes it a single-bar trigger for the Generator.
Parameters
The indicator has no parameters.
Calculation
The formation is judged on the read bar — the previous closed bar behind a Bar Open decision, the bar being closed behind a Bar Close exit:
- take the read bar and the bar before it;
- the read bar is inside when
high[read − 1] < high[read − 2]andlow[read − 1] > low[read − 2].
No price series is drawn: the indicator contributes only the two signal arrays.
Backtesting
- The rule is evaluated on the previous (closed) bar behind a Bar Open point and on the current bar behind a Bar Close point, so the formation is always made of completed bars — it never looks ahead.
- Strict comparisons: a bar with exactly the same high or low as its predecessor is not an inside bar.
- The indicator never changes the entry or exit order price; the level comes from the point indicator.
Related
- Pin Bar — the other single-bar price formation
- Narrow Range — the range-based equivalent
- Indicators index