[Fix]修复Issue #494

This commit is contained in:
vn.py 2017-09-20 18:01:24 +08:00
parent 8e9d7b810a
commit 369fa04690

View File

@ -259,9 +259,9 @@ class SniperAlgo(StAlgoTemplate):
vtSymbol = order.vtSymbol
# 从委托列表中移除该委托
orderList = self.legOrderDict[vtSymbol]
orderList = self.legOrderDict.get(vtSymbol, None)
if vtOrderID in orderList:
if orderList and vtOrderID in orderList:
orderList.remove(vtOrderID)
# 检查若是被动腿,且已经没有未完成委托,则执行对冲