[Fix]修复OM策略引擎的vtSymbol和strategy映射bug

This commit is contained in:
vn.py 2018-03-21 10:47:00 +08:00
parent e459ea311e
commit 254f5abb6b

View File

@ -362,7 +362,11 @@ class OmStrategyEngine(object):
# 保存Tick映射关系
for vtSymbol in strategy.vtSymbols:
l = self.symbolStrategyDict.setdefault(vtSymbol, [])
if vtSymbol in self.symbolStrategyDict:
l = self.symbolStrategyDict[vtSymbol]
else:
l = []
self.symbolStrategyDict[vtSymbol] = l
l.append(strategy)
#----------------------------------------------------------------------