mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-21 22:43:52 +00:00
indicator/rma: move endTime update to PushK
This commit is contained in:
parent
ed91fdc915
commit
4300e00580
|
@ -69,6 +69,7 @@ var _ types.SeriesExtend = &RMA{}
|
|||
|
||||
func (inc *RMA) PushK(k types.KLine) {
|
||||
inc.Update(k.Close.Float64())
|
||||
inc.EndTime = k.EndTime.Time()
|
||||
}
|
||||
|
||||
func (inc *RMA) CalculateAndUpdate(kLines []types.KLine) {
|
||||
|
@ -87,7 +88,6 @@ func (inc *RMA) CalculateAndUpdate(kLines []types.KLine) {
|
|||
}
|
||||
|
||||
inc.EmitUpdate(inc.Last())
|
||||
inc.EndTime = last.EndTime.Time()
|
||||
}
|
||||
|
||||
func (inc *RMA) handleKLineWindowUpdate(interval types.Interval, window types.KLineWindow) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user