From 0d4b12cfd7db489a1053b4111840a4f19bddeca2 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Mon, 1 Oct 2018 22:42:29 +0800 Subject: [PATCH] [Fix]Close #1142 --- vnpy/trader/app/ctaStrategy/ctaEngine.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vnpy/trader/app/ctaStrategy/ctaEngine.py b/vnpy/trader/app/ctaStrategy/ctaEngine.py index 07f63b25..99d30806 100644 --- a/vnpy/trader/app/ctaStrategy/ctaEngine.py +++ b/vnpy/trader/app/ctaStrategy/ctaEngine.py @@ -256,7 +256,6 @@ class CtaEngine(AppEngine): def processTickEvent(self, event): """处理行情推送""" tick = event.dict_['data'] - tick = copy(tick) # 收到tick行情后,先处理本地停止单(检查是否要立即发出) @@ -276,7 +275,8 @@ class CtaEngine(AppEngine): # 逐个推送到策略实例中 l = self.tickStrategyDict[tick.vtSymbol] for strategy in l: - self.callStrategyFunc(strategy, strategy.onTick, tick) + if strategy.inited: + self.callStrategyFunc(strategy, strategy.onTick, tick) #---------------------------------------------------------------------- def processOrderEvent(self, event):