From 8b7d373359018576f34e13e899326f24fc903c01 Mon Sep 17 00:00:00 2001 From: msincenselee Date: Fri, 5 May 2017 19:48:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E9=98=85=E5=90=88=E7=BA=A6=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=EF=BC=8C=E6=94=B9=E4=B8=BA=E5=80=9F=E7=94=A8=E8=B4=A6?= =?UTF-8?q?=E5=8F=B7=E6=9B=B4=E6=96=B0=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vn.trader/ctaStrategy/ctaEngine.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vn.trader/ctaStrategy/ctaEngine.py b/vn.trader/ctaStrategy/ctaEngine.py index 28a9fc6e..c1de33a5 100644 --- a/vn.trader/ctaStrategy/ctaEngine.py +++ b/vn.trader/ctaStrategy/ctaEngine.py @@ -461,7 +461,9 @@ class CtaEngine(object): # 注册持仓更新事件 self.eventEngine.register(EVENT_POSITION, self.processPositionEvent) - self.eventEngine.register(EVENT_POSITION, self.checkUnsubscribedSymbols) + + # 账号更新事件(借用账号更新事件,来检查是否有未订阅的合约信息) + self.eventEngine.register(EVENT_ACCOUNT, self.checkUnsubscribedSymbols) # 注册定时器事件 self.eventEngine.register(EVENT_TIMER, self.processTimerEvent)