xmaker: fix trade checking

This commit is contained in:
c9s 2021-05-30 00:11:35 +08:00
parent d962dbe542
commit 9a68cfd288

View File

@ -824,8 +824,10 @@ func (s *Strategy) CrossRun(ctx context.Context, orderExecutionRouter bbgo.Order
// process pending trades
if s.tradeStore.Num() > 0 {
for _, trade := range s.tradeStore.Trades() {
if s.orderStore.Exists(trade.OrderID) {
s.processTrade(trade)
}
}
s.tradeStore.Clear()
}