[Fix]Close #747
This commit is contained in:
parent
387332aee6
commit
6553a7084d
@ -284,11 +284,11 @@ class TargetPosTemplate(CtaTemplate):
|
|||||||
if posChange > 0:
|
if posChange > 0:
|
||||||
longPrice = self.lastTick.askPrice1 + self.tickAdd
|
longPrice = self.lastTick.askPrice1 + self.tickAdd
|
||||||
if tick.upperLimit:
|
if tick.upperLimit:
|
||||||
longPrice = min(longPrice, tick.upperLimit) # 涨停价检查
|
longPrice = min(longPrice, self.lastTick.upperLimit) # 涨停价检查
|
||||||
else:
|
else:
|
||||||
shortPrice = self.lastTick.bidPrice1 - self.tickAdd
|
shortPrice = self.lastTick.bidPrice1 - self.tickAdd
|
||||||
if tick.lowerLimit:
|
if tick.lowerLimit:
|
||||||
shortPrice = max(shortPrice, tick.lowerLimit) # 跌停价检查
|
shortPrice = max(shortPrice, self.lastTick.lowerLimit) # 跌停价检查
|
||||||
else:
|
else:
|
||||||
if posChange > 0:
|
if posChange > 0:
|
||||||
longPrice = self.lastBar.close + self.tickAdd
|
longPrice = self.lastBar.close + self.tickAdd
|
||||||
|
Loading…
Reference in New Issue
Block a user