[Fix] close #545
This commit is contained in:
parent
4b1af5e10e
commit
19bf554ecb
@ -621,8 +621,9 @@ class CtaEngine(object):
|
|||||||
"""全部撤单"""
|
"""全部撤单"""
|
||||||
s = self.strategyOrderDict[name]
|
s = self.strategyOrderDict[name]
|
||||||
|
|
||||||
# 遍历集合,全部撤单
|
# 遍历列表,全部撤单
|
||||||
for orderID in s:
|
# 这里不能直接遍历集合s,因为撤单时会修改s中的内容,导致出错
|
||||||
|
for orderID in list(s):
|
||||||
if STOPORDERPREFIX in orderID:
|
if STOPORDERPREFIX in orderID:
|
||||||
self.cancelStopOrder(orderID)
|
self.cancelStopOrder(orderID)
|
||||||
else:
|
else:
|
||||||
|
@ -794,7 +794,7 @@ class PositionDetail(object):
|
|||||||
self.longPosFrozen = self.longYdFrozen + self.longTdFrozen
|
self.longPosFrozen = self.longYdFrozen + self.longTdFrozen
|
||||||
self.shortPosFrozen = self.shortYdFrozen + self.shortTdFrozen
|
self.shortPosFrozen = self.shortYdFrozen + self.shortTdFrozen
|
||||||
|
|
||||||
self.output()
|
#self.output()
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
def output(self):
|
def output(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user