fix: ssf less indent

This commit is contained in:
zenix 2022-06-16 13:02:00 +09:00
parent f4c4d631f8
commit 0377ecd42d

View File

@ -91,15 +91,15 @@ func (inc *SSF) Last() float64 {
var _ types.Series = &SSF{} var _ types.Series = &SSF{}
func (inc *SSF) calculateAndUpdate(allKLines []types.KLine) { func (inc *SSF) calculateAndUpdate(allKLines []types.KLine) {
if inc.Values == nil { if inc.Values != nil {
inc.Update(allKLines[len(allKLines)-1].Close.Float64())
inc.EmitUpdate(inc.Last())
return
}
for _, k := range allKLines { for _, k := range allKLines {
inc.Update(k.Close.Float64()) inc.Update(k.Close.Float64())
inc.EmitUpdate(inc.Last()) inc.EmitUpdate(inc.Last())
} }
} else {
inc.Update(allKLines[len(allKLines)-1].Close.Float64())
inc.EmitUpdate(inc.Last())
}
} }
func (inc *SSF) handleKLineWindowUpdate(interval types.Interval, window types.KLineWindow) { func (inc *SSF) handleKLineWindowUpdate(interval types.Interval, window types.KLineWindow) {