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