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

SlotAvailableRole
Entry PointNo—
Entry RuleYesFilters entries: allows or denies opening a position.
Exit PointNo—
Exit RuleYesTriggers 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

RuleLong signal is 1 whenShort signal is 1 when
There is an Inside Bar formationthe previous bar is inside the bar before itthe 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:

  1. take the read bar and the bar before it;
  2. the read bar is inside when high[read − 1] < high[read − 2] and low[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.