backtest: update order update time when new trade happen

This commit is contained in:
c9s 2022-05-11 15:04:11 +08:00
parent 323c94149d
commit 4e4912ebdc
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -234,6 +234,9 @@ func (m *SimplePriceMatching) newTradeFromOrder(order types.Order, isMaker bool)
}
// update order time
order.UpdateTime = types.Time(m.CurrentTime)
var id = incTradeID()
return types.Trade{
ID: id,