This commit is contained in:
vn.py 2017-09-22 22:05:39 +08:00
parent fb8b404666
commit 9778e85480

View File

@ -470,9 +470,12 @@ class DataEngine(object):
# 设置持仓细节的委托转换模式 # 设置持仓细节的委托转换模式
contract = self.getContract(vtSymbol) contract = self.getContract(vtSymbol)
if contract and contract.exchange is EXCHANGE_SHFE: if contract:
# 上期所合约
if contract.exchange is EXCHANGE_SHFE:
detail.mode = detail.MODE_SHFE detail.mode = detail.MODE_SHFE
# 检查是否有平今惩罚
for productID in self.tdPenaltyList: for productID in self.tdPenaltyList:
if str(productID) in contract.symbol: if str(productID) in contract.symbol:
detail.mode = detail.MODE_TDPENALTY detail.mode = detail.MODE_TDPENALTY