[Fix]解决上期所合约的PositionDetail初始化识别不了的问题
This commit is contained in:
parent
711265c70a
commit
2406d4a586
@ -480,7 +480,7 @@ class DataEngine(object):
|
|||||||
detail.exchange = contract.exchange
|
detail.exchange = contract.exchange
|
||||||
|
|
||||||
# 上期所合约
|
# 上期所合约
|
||||||
if contract.exchange is EXCHANGE_SHFE:
|
if contract.exchange == EXCHANGE_SHFE:
|
||||||
detail.mode = detail.MODE_SHFE
|
detail.mode = detail.MODE_SHFE
|
||||||
|
|
||||||
# 检查是否有平今惩罚
|
# 检查是否有平今惩罚
|
||||||
@ -720,6 +720,8 @@ class PositionDetail(object):
|
|||||||
self.shortYd = pos.ydPosition
|
self.shortYd = pos.ydPosition
|
||||||
self.shortTd = self.shortPos - self.shortYd
|
self.shortTd = self.shortPos - self.shortYd
|
||||||
|
|
||||||
|
self.output()
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
def updateOrderReq(self, req, vtOrderID):
|
def updateOrderReq(self, req, vtOrderID):
|
||||||
"""发单更新"""
|
"""发单更新"""
|
||||||
|
Loading…
Reference in New Issue
Block a user