indicator: remove unnecessary zero value push

This commit is contained in:
c9s 2023-10-24 13:44:49 +08:00
parent a9d9ef3792
commit 4c1654652e
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -48,11 +48,6 @@ func (s *RMAStream) Calculate(x float64) float64 {
}
s.counter++
if s.counter < s.window {
// we can use x, but we need to use 0. to make the same behavior as the result from python pandas_ta
s.Slice.Push(0)
}
s.Slice.Push(tmp)
s.previous = tmp
return tmp