Cong Adaptive MA

All functions · nseries package

CongAdaptiveMA

func (s Series) CongAdaptiveMA(h, l, c Series, n int) Series

CongAdaptiveMA implements Scott Cong’s Adaptive Moving Average (as described in TASC March 2023). Mismatched input lengths (including the receiver, which provides the price series being smoothed) return a zero-filled series of the receiver’s length.

The warm-up reads 0, not NaN: bars 0 to n-2 are 0, a price level at 0, and the recursion is seeded with the input at bar n-1.