From 8e9d7b810af41b9a41d76c477ef25bcb8a414d64 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Wed, 20 Sep 2017 15:57:19 +0800 Subject: [PATCH] =?UTF-8?q?[Fix]=E4=BF=AE=E5=A4=8DCTA=E5=9B=9E=E6=B5=8B?= =?UTF-8?q?=E6=92=A4=E5=8D=95=E6=B2=A1=E6=9C=89=E5=A7=94=E6=89=98=E6=8E=A8?= =?UTF-8?q?=E9=80=81=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vnpy/trader/app/ctaStrategy/ctaBacktesting.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vnpy/trader/app/ctaStrategy/ctaBacktesting.py b/vnpy/trader/app/ctaStrategy/ctaBacktesting.py index 132a917d..cfd6c772 100644 --- a/vnpy/trader/app/ctaStrategy/ctaBacktesting.py +++ b/vnpy/trader/app/ctaStrategy/ctaBacktesting.py @@ -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] #----------------------------------------------------------------------