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