[Fix]修复CTA回测撤单没有委托推送的bug

This commit is contained in:
vn.py 2017-09-20 15:57:19 +08:00
parent a17c1d6e58
commit 8e9d7b810a

View File

@ -472,8 +472,12 @@ class BacktestingEngine(object):
"""撤单"""
if vtOrderID in self.workingLimitOrderDict:
order = self.workingLimitOrderDict[vtOrderID]
order.status = STATUS_CANCELLED
order.cancelTime = self.dt.strftime('%H:%M:%S')
self.strategy.onOrder(order)
del self.workingLimitOrderDict[vtOrderID]
#----------------------------------------------------------------------