stop loss limit when hit, the close price is “average”
This commit is contained in:
parent
fb755880fa
commit
c913fef80c
@ -256,7 +256,7 @@ class Trade(_DECL_BASE):
|
||||
elif order_type == 'stop_loss_limit':
|
||||
self.stoploss_order_id = None
|
||||
logger.info('STOP_LOSS_LIMIT is hit for %s.', self)
|
||||
self.close(order['price'])
|
||||
self.close(order['average'])
|
||||
else:
|
||||
raise ValueError(f'Unknown order type: {order_type}')
|
||||
cleanup()
|
||||
|
Loading…
Reference in New Issue
Block a user