mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
indicator: remove unnecessary zero value push
This commit is contained in:
parent
a9d9ef3792
commit
4c1654652e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user