From 6d857cdd48728285fadaaa7af1efa95b612705d0 Mon Sep 17 00:00:00 2001 From: c9s Date: Wed, 16 Oct 2024 16:07:58 +0800 Subject: [PATCH] indicator: improve boll indicator slice truncation --- pkg/indicator/v2/boll.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/indicator/v2/boll.go b/pkg/indicator/v2/boll.go index 9feda9f52..09335878d 100644 --- a/pkg/indicator/v2/boll.go +++ b/pkg/indicator/v2/boll.go @@ -58,4 +58,6 @@ func (s *BOLLStream) Calculate(v float64) float64 { func (s *BOLLStream) Truncate() { s.Slice = generalTruncate(s.Slice) + s.UpBand.Slice = generalTruncate(s.UpBand.Slice) + s.DownBand.Slice = generalTruncate(s.DownBand.Slice) }