fix: currentTime in backtest not updated

This commit is contained in:
zenix 2022-08-30 21:12:23 +09:00
parent be1f6e7242
commit 51d7c1b9ad

View File

@ -379,6 +379,7 @@ func (e *Exchange) ConsumeKLine(k types.KLine) {
if kline1m.Interval != types.Interval1m {
panic("expect 1m kline, get " + kline1m.Interval.String())
}
e.currentTime = kline1m.EndTime.Time()
// here we generate trades and order updates
matching.processKLine(kline1m)
matching.NextKLine = &k