[Fix]Close #778
This commit is contained in:
parent
9e71df1ebd
commit
0de9573759
@ -283,11 +283,11 @@ class TargetPosTemplate(CtaTemplate):
|
|||||||
if self.lastTick:
|
if self.lastTick:
|
||||||
if posChange > 0:
|
if posChange > 0:
|
||||||
longPrice = self.lastTick.askPrice1 + self.tickAdd
|
longPrice = self.lastTick.askPrice1 + self.tickAdd
|
||||||
if tick.upperLimit:
|
if self.lastTick.upperLimit:
|
||||||
longPrice = min(longPrice, self.lastTick.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 self.lastTick.lowerLimit:
|
||||||
shortPrice = max(shortPrice, self.lastTick.lowerLimit) # 跌停价检查
|
shortPrice = max(shortPrice, self.lastTick.lowerLimit) # 跌停价检查
|
||||||
else:
|
else:
|
||||||
if posChange > 0:
|
if posChange > 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user