This commit is contained in:
vn.py 2019-02-23 09:41:46 +08:00
parent f94e078a75
commit a9f652607c
2 changed files with 2 additions and 3 deletions

View File

@ -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):

View File

@ -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)