Skip to content

Commit

Permalink
Kaufman's Adaptive Moving Average (KAMA) indicator is added.
Browse files Browse the repository at this point in the history
  • Loading branch information
cinar committed Jun 10, 2024
1 parent 68a49cb commit 5cd20c3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions trend/kama.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5cd20c3

Please sign in to comment.