mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 06:53:52 +00:00
fix: ssf less indent
This commit is contained in:
parent
f4c4d631f8
commit
0377ecd42d
|
@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user