From 973a627dd1b93c2f7ced9a01ae1d5408ba2317e9 Mon Sep 17 00:00:00 2001 From: msincenselee Date: Sat, 20 May 2017 21:23:34 +0800 Subject: [PATCH] bug fix --- vn.trader/ctaStrategy/ctaPosition.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vn.trader/ctaStrategy/ctaPosition.py b/vn.trader/ctaStrategy/ctaPosition.py index 0fbcb64b..3e7e95b1 100644 --- a/vn.trader/ctaStrategy/ctaPosition.py +++ b/vn.trader/ctaStrategy/ctaPosition.py @@ -107,7 +107,7 @@ class CtaPosition: self.writeCtaLog(u'多仓:{0}->{1}'.format(self.longPos, self.longPos - vol)) self.writeCtaLog(u'净:{0}->{1}'.format(self.pos, self.pos-vol)) - self.shortPos -= vol + self.longPos -= vol self.pos -= vol self.strategy.pos = self.pos