Inside bar

inside_barpatternsForge API 1

A bar whose range sits within the previous bar's range.

Inputs

NameTypeDefault
allow_equalbooltrue

Outputs

NameTypeRequiredDescription
inside_bareventOptionalcolor_down theme.down, color_up theme.up, shape diamond, style marker, where above_bar
in_a_rowvalueOptionalcolor theme.neutral, style line, width 1
Warm-up
1 bars (1 at the defaults)
Repaints
No
Parity
None

Formula

body = |close - open|, range = high - low, upper wick = high - max(open, close), lower wick = min(open, close) - low

high <= the previous high and low >= the previous low (strictly with equal values off); both bars have a range

in_a_row = how many inside bars in a row end at this bar, 0 on a bar that is not one

Found: 1

A bar whose high equals its low, or that has a missing price, is never part of a pattern. Computed on the prices the bars are drawn with: on Heikin-Ashi or Renko bars those are the built candles.