From 076c573d1e63712f5ba146f3bb1be1cd24da4578 Mon Sep 17 00:00:00 2001 From: msincenselee Date: Sun, 7 May 2017 18:54:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=E5=AF=B9=E7=AD=96=E7=95=A5?= =?UTF-8?q?=E6=8C=81=E4=BB=93pos=E5=AD=97=E6=AE=B5=E7=9A=84=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E3=80=82=E6=94=B9=E4=B8=BA=E7=94=B1=E7=AD=96=E7=95=A5?= =?UTF-8?q?=E5=86=85=E9=83=A8=E8=87=AA=E8=A1=8C=E6=9B=B4=E6=96=B0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vn.trader/ctaStrategy/ctaEngine.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vn.trader/ctaStrategy/ctaEngine.py b/vn.trader/ctaStrategy/ctaEngine.py index c1de33a5..9dcafa95 100644 --- a/vn.trader/ctaStrategy/ctaEngine.py +++ b/vn.trader/ctaStrategy/ctaEngine.py @@ -415,11 +415,11 @@ class CtaEngine(object): # 3.提取对应的策略 strategy = self.orderStrategyDict[trade.vtOrderID] - # 计算策略持仓 - if trade.direction == DIRECTION_LONG: - strategy.pos += trade.volume - else: - strategy.pos -= trade.volume + # 计算策略持仓 ( canceled by IncenseLee ) + #if trade.direction == DIRECTION_LONG: + # strategy.pos += trade.volume + #else: + # strategy.pos -= trade.volume self.callStrategyFunc(strategy, strategy.onTrade, trade)