From 4c1654652eb20eec8237e51b0c7c92fc3e921524 Mon Sep 17 00:00:00 2001 From: c9s Date: Tue, 24 Oct 2023 13:44:49 +0800 Subject: [PATCH] indicator: remove unnecessary zero value push --- pkg/indicator/v2/rma.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkg/indicator/v2/rma.go b/pkg/indicator/v2/rma.go index 1aa08ccdc..4a6c8b327 100644 --- a/pkg/indicator/v2/rma.go +++ b/pkg/indicator/v2/rma.go @@ -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