mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 06:53:52 +00:00
indicator: pull out emit update
This commit is contained in:
parent
bbf01275cc
commit
975d0d6995
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user