From ea08a61e28a2802d345e125d44f2fb84e65ff768 Mon Sep 17 00:00:00 2001 From: c9s Date: Thu, 21 Jul 2022 01:35:27 +0800 Subject: [PATCH] indicator/stoch: simplify CalculateAndUpdate --- pkg/indicator/stoch.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkg/indicator/stoch.go b/pkg/indicator/stoch.go index 9b1955cde..a96891e31 100644 --- a/pkg/indicator/stoch.go +++ b/pkg/indicator/stoch.go @@ -85,14 +85,8 @@ func (inc *STOCH) CalculateAndUpdate(kLines []types.KLine) { } for _, k := range kLines { - if inc.EndTime != zeroTime && !k.EndTime.After(inc.EndTime) { - continue - } - inc.PushK(k) } - - inc.EmitUpdate(inc.LastK(), inc.LastD()) } func (inc *STOCH) handleKLineWindowUpdate(interval types.Interval, window types.KLineWindow) {