diff --git a/pkg/indicator/sma.go b/pkg/indicator/sma.go index 070a1238b..7f5fa65b9 100644 --- a/pkg/indicator/sma.go +++ b/pkg/indicator/sma.go @@ -69,14 +69,13 @@ func (inc *SMA) CalculateAndUpdate(allKLines []types.KLine) { if inc.EndTime != zeroTime && k.EndTime.Before(inc.EndTime) { continue } - inc.PushK(k) - inc.EmitUpdate(inc.Values.Last()) } } else { inc.PushK(last) - inc.EmitUpdate(inc.Values.Last()) } + + inc.EmitUpdate(inc.Values.Last()) } func (inc *SMA) handleKLineWindowUpdate(interval types.Interval, window types.KLineWindow) {