From 6553a7084dbd9381e763511e7310e825103d1854 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Thu, 22 Feb 2018 22:34:58 +0800 Subject: [PATCH] [Fix]Close #747 --- vnpy/trader/app/ctaStrategy/ctaTemplate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vnpy/trader/app/ctaStrategy/ctaTemplate.py b/vnpy/trader/app/ctaStrategy/ctaTemplate.py index 9efdde8e..5ff2031a 100644 --- a/vnpy/trader/app/ctaStrategy/ctaTemplate.py +++ b/vnpy/trader/app/ctaStrategy/ctaTemplate.py @@ -284,11 +284,11 @@ class TargetPosTemplate(CtaTemplate): if posChange > 0: longPrice = self.lastTick.askPrice1 + self.tickAdd if tick.upperLimit: - longPrice = min(longPrice, tick.upperLimit) # 涨停价检查 + longPrice = min(longPrice, self.lastTick.upperLimit) # 涨停价检查 else: shortPrice = self.lastTick.bidPrice1 - self.tickAdd if tick.lowerLimit: - shortPrice = max(shortPrice, tick.lowerLimit) # 跌停价检查 + shortPrice = max(shortPrice, self.lastTick.lowerLimit) # 跌停价检查 else: if posChange > 0: longPrice = self.lastBar.close + self.tickAdd