Keltner Channels
All functions · nseries package
Keltner
func (s Series) Keltner(h, l, c Series, priceLen int, trLen int, atrFactor float64) Series
Keltner is an alias for KeltnerSS. This calculation is the one used by TradeStation.
Before the averages fill, each bar is s[i] + atrFactor*TrueRange[i], because both averages pass their inputs through, so the band starts as the price plus a multiple of one bar’s true range.
KeltnerSS
func (s Series) KeltnerSS(h, l, c Series, priceLen int, trLen int, atrFactor float64) Series
KeltnerSS returns a simple smoothed series adjusted by the simple moving average of a specified number of true ranges (which could be negative) determined from the specified previous number of true range bars. This calculation is the one used by TradeStation. Mismatched input lengths return a zero-filled series of the receiver’s length.
Before the averages fill, each bar is s[i] + atrFactor*TrueRange[i], because both averages pass their inputs through, so the band starts as the price plus a multiple of one bar’s true range.
KeltnerSX
func (s Series) KeltnerSX(h, l, c Series, priceLen int, trLen int, atrFactor float64) Series
KeltnerSX returns a simple smoothed series adjusted by the exponential moving average of a specified number of true ranges (which could be negative) determined from the specified previous number of true range bars. Mismatched input lengths return a zero-filled series of the receiver’s length.
Before the averages fill, each bar is s[i] + atrFactor*TrueRange[i], because both averages pass their inputs through, so the band starts as the price plus a multiple of one bar’s true range.
KeltnerXS
func (s Series) KeltnerXS(h, l, c Series, priceLen int, trLen int, atrFactor float64) Series
KeltnerXS returns an exponentially smoothed series adjusted by the simple moving average of a specified number of true ranges (which could be negative) determined from the specified previous number of true range bars. Mismatched input lengths return a zero-filled series of the receiver’s length.
Before the averages fill, each bar is s[i] + atrFactor*TrueRange[i], because both averages pass their inputs through, so the band starts as the price plus a multiple of one bar’s true range.
KeltnerXX
func (s Series) KeltnerXX(h, l, c Series, priceLen int, trLen int, atrFactor float64) Series
KeltnerXX returns an exponential mple smoothed series adjusted by the exponential moving average of a specified number of true ranges (which could be negative) determined from the specified previous number of true range bars. Mismatched input lengths return a zero-filled series of the receiver’s length.
Before the averages fill, each bar is s[i] + atrFactor*TrueRange[i], because both averages pass their inputs through, so the band starts as the price plus a multiple of one bar’s true range.