[Fix]解决上期所合约的PositionDetail初始化识别不了的问题

This commit is contained in:
vn.py 2017-10-17 21:53:01 +08:00
parent 711265c70a
commit 2406d4a586

View File

@ -480,7 +480,7 @@ class DataEngine(object):
detail.exchange = contract.exchange
# 上期所合约
if contract.exchange is EXCHANGE_SHFE:
if contract.exchange == EXCHANGE_SHFE:
detail.mode = detail.MODE_SHFE
# 检查是否有平今惩罚
@ -719,6 +719,8 @@ class PositionDetail(object):
self.shortPos = pos.position
self.shortYd = pos.ydPosition
self.shortTd = self.shortPos - self.shortYd
self.output()
#----------------------------------------------------------------------
def updateOrderReq(self, req, vtOrderID):