From 2406d4a5862001183ed7f3532a5d02a284c1fdb2 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Tue, 17 Oct 2017 21:53:01 +0800 Subject: [PATCH] =?UTF-8?q?[Fix]=E8=A7=A3=E5=86=B3=E4=B8=8A=E6=9C=9F?= =?UTF-8?q?=E6=89=80=E5=90=88=E7=BA=A6=E7=9A=84PositionDetail=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96=E8=AF=86=E5=88=AB=E4=B8=8D=E4=BA=86=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vnpy/trader/vtEngine.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vnpy/trader/vtEngine.py b/vnpy/trader/vtEngine.py index 52085e8a..495cc435 100644 --- a/vnpy/trader/vtEngine.py +++ b/vnpy/trader/vtEngine.py @@ -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):