mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 08:15:15 +00:00
indicator/stoch: simplify CalculateAndUpdate
This commit is contained in:
parent
86c1619e50
commit
ea08a61e28
|
@ -85,14 +85,8 @@ func (inc *STOCH) CalculateAndUpdate(kLines []types.KLine) {
|
|||
}
|
||||
|
||||
for _, k := range kLines {
|
||||
if inc.EndTime != zeroTime && !k.EndTime.After(inc.EndTime) {
|
||||
continue
|
||||
}
|
||||
|
||||
inc.PushK(k)
|
||||
}
|
||||
|
||||
inc.EmitUpdate(inc.LastK(), inc.LastD())
|
||||
}
|
||||
|
||||
func (inc *STOCH) handleKLineWindowUpdate(interval types.Interval, window types.KLineWindow) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user