[Fix]Close #520
This commit is contained in:
parent
fb8b404666
commit
9778e85480
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user