[Fix]Close #909
This commit is contained in:
parent
d33a585b0f
commit
5fb1cafc0d
@ -234,8 +234,8 @@ class BacktestingEngine(object):
|
||||
|
||||
self.output(u'开始回测')
|
||||
|
||||
self.strategy.inited = True
|
||||
self.strategy.onInit()
|
||||
self.strategy.inited = True
|
||||
self.output(u'策略初始化完成')
|
||||
|
||||
self.strategy.trading = True
|
||||
|
@ -430,8 +430,9 @@ class CtaEngine(object):
|
||||
strategy = self.strategyDict[name]
|
||||
|
||||
if not strategy.inited:
|
||||
strategy.inited = True
|
||||
self.callStrategyFunc(strategy, strategy.onInit)
|
||||
strategy.inited = True
|
||||
|
||||
self.loadSyncData(strategy) # 初始化完成后加载同步数据
|
||||
self.subscribeMarketData(strategy) # 加载同步数据后再订阅行情
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user