diff --git a/trend/kama.go b/trend/kama.go index 9d858ef..9df6e69 100644 --- a/trend/kama.go +++ b/trend/kama.go @@ -115,10 +115,7 @@ func (k *Kama[T]) Compute(closings <-chan T) <-chan T { break } - sc, ok := <-scs - if !ok { - break - } + sc := <-scs prevKama = prevKama + sc*(closing-prevKama) kama <- prevKama