From a1faf9b27dba8d570af329db534b3f51bb23c804 Mon Sep 17 00:00:00 2001 From: msincenselee Date: Sat, 4 Apr 2020 21:18:49 +0800 Subject: [PATCH] =?UTF-8?q?[bug=20fix]=20=E9=81=BF=E5=85=8Dactive=5Forders?= =?UTF-8?q?=E5=9C=A8=E5=A4=9A=E4=B8=AA=E5=AE=9E=E4=BE=8B=E9=97=B4=E5=86=B2?= =?UTF-8?q?=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vnpy/app/cta_crypto/template.py | 1 + vnpy/app/cta_strategy_pro/template.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/vnpy/app/cta_crypto/template.py b/vnpy/app/cta_crypto/template.py index fec4bffe..2c1c0fa9 100644 --- a/vnpy/app/cta_crypto/template.py +++ b/vnpy/app/cta_crypto/template.py @@ -50,6 +50,7 @@ class CtaTemplate(ABC): self.entrust = 0 # 是否正在委托, 0, 无委托 , 1, 委托方向是LONG, -1, 委托方向是SHORT self.tick_dict = {} # 记录所有on_tick传入最新tick + self.active_orders = {} # Copy a new variables list here to avoid duplicate insert when multiple # strategy instances are created with the same strategy class. diff --git a/vnpy/app/cta_strategy_pro/template.py b/vnpy/app/cta_strategy_pro/template.py index c48d62b6..b7981cbc 100644 --- a/vnpy/app/cta_strategy_pro/template.py +++ b/vnpy/app/cta_strategy_pro/template.py @@ -51,7 +51,7 @@ class CtaTemplate(ABC): self.entrust = 0 # 是否正在委托, 0, 无委托 , 1, 委托方向是LONG, -1, 委托方向是SHORT self.tick_dict = {} # 记录所有on_tick传入最新tick - + self.active_orders = {} # Copy a new variables list here to avoid duplicate insert when multiple # strategy instances are created with the same strategy class. self.variables = copy(self.variables)