This commit is contained in:
vn.py 2018-12-24 09:35:40 +08:00
parent 581294d079
commit 41d970c041

View File

@ -195,8 +195,8 @@ class TcEngine(object):
req.price = tick.upperLimit req.price = tick.upperLimit
else: else:
req.price = tick.askPrice1 req.price = tick.askPrice1
elif DIRECTION_SHROT in vtPositionName: elif DIRECTION_SHORT in vtPositionName:
req.direction = DIRECTION_SHROT req.direction = DIRECTION_SHORT
if tick.lowerLimit: if tick.lowerLimit:
req.price = tick.lowerLimit req.price = tick.lowerLimit
else: else:
@ -209,13 +209,13 @@ class TcEngine(object):
req.offset = OFFSET_CLOSE req.offset = OFFSET_CLOSE
if DIRECTION_LONG in vtPositionName: if DIRECTION_LONG in vtPositionName:
req.direction = DIRECTION_SHROT req.direction = DIRECTION_SHORT
if tick.upperLimit: if tick.upperLimit:
req.price = tick.upperLimit req.price = tick.upperLimit
else: else:
req.price = tick.askPrice1 req.price = tick.askPrice1
elif DIRECTION_SHROT in vtPositionName: elif DIRECTION_SHORT in vtPositionName:
req.direction = DIRECTION_LONG req.direction = DIRECTION_LONG
if tick.lowerLimit: if tick.lowerLimit:
req.price = tick.lowerLimit req.price = tick.lowerLimit