From 4e4912ebdc8448fc5210aafc99312c2fbe8d1f6a Mon Sep 17 00:00:00 2001 From: c9s Date: Wed, 11 May 2022 15:04:11 +0800 Subject: [PATCH] backtest: update order update time when new trade happen --- pkg/backtest/matching.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/backtest/matching.go b/pkg/backtest/matching.go index f95a5fca4..dc6581725 100644 --- a/pkg/backtest/matching.go +++ b/pkg/backtest/matching.go @@ -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,