From a9f652607cef49fa842e6c3dddedbfb4d9377bba Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Sat, 23 Feb 2019 09:41:46 +0800 Subject: [PATCH] [Fix]close #1387 --- vnpy/app/cta_strategy/__init__.py | 2 +- vnpy/app/cta_strategy/engine.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/vnpy/app/cta_strategy/__init__.py b/vnpy/app/cta_strategy/__init__.py index 943b0ff5..9d079f9b 100644 --- a/vnpy/app/cta_strategy/__init__.py +++ b/vnpy/app/cta_strategy/__init__.py @@ -7,7 +7,7 @@ from vnpy.trader.utility import BarGenerator, ArrayManager from .base import APP_NAME, StopOrder from .engine import CtaEngine -from .template import CtaTemplate +from .template import CtaTemplate, CtaSignal, TargetPosTemplate class CtaStrategyApp(BaseApp): diff --git a/vnpy/app/cta_strategy/engine.py b/vnpy/app/cta_strategy/engine.py index e3211baf..d09d8b2e 100644 --- a/vnpy/app/cta_strategy/engine.py +++ b/vnpy/app/cta_strategy/engine.py @@ -54,7 +54,6 @@ class CtaEngine(BaseEngine): super(CtaEngine, self).__init__( main_engine, event_engine, "CtaStrategy") - self.setting_file = None # setting file object self.strategy_setting = {} # strategy_name: dict self.strategy_data = {} # strategy_name: dict @@ -710,7 +709,7 @@ class CtaEngine(BaseEngine): """ Update setting file. """ - if strategy_name not in self.setting_file: + if strategy_name not in self.strategy_setting: return self.strategy_setting.pop(strategy_name)