Bar Classification
All functions · nseries package
InsideBars
func (s Series) InsideBars(args ...Series) []bool
InsideBars returns a slice of booleans indicating whether each bar is an inside bar. An inside bar is a bar whose high and low are within the range of the prior non-inside bar (the engulfing bar). The first bar is never an inside bar. The function accepts either two Series (high, low) or four Series (open, high, low, close). Only the high and low are used; providing open and close is accepted for call-site convenience when working with OHLC data.
OutsideBars
func (s Series) OutsideBars(args ...Series) []bool
OutsideBars returns a slice of booleans indicating whether each bar is an outside bar. An outside bar is a bar whose high is above the prior bar’s high and whose low is below the prior bar’s low. The first bar is never an outside bar. The function accepts either two Series (high, low) or four Series (open, high, low, close). Only the high and low are used; providing open and close is accepted for call-site convenience when working with OHLC data.