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,14 +91,14 @@ func (inc *SSF) Last() float64 {
var _ types.Series = &SSF{}
func (inc *SSF) calculateAndUpdate(allKLines []types.KLine) {
if inc.Values == nil {
for _, k := range allKLines {
inc.Update(k.Close.Float64())
inc.EmitUpdate(inc.Last())
}
} else {
if inc.Values != nil {
inc.Update(allKLines[len(allKLines)-1].Close.Float64())
inc.EmitUpdate(inc.Last())
return
}
for _, k := range allKLines {
inc.Update(k.Close.Float64())
inc.EmitUpdate(inc.Last())
}
}