Fix bug when stoploss_on_exchange in combination with dry-run
does not sell orders
This commit is contained in:
parent
6e3336cb30
commit
099bbc5c7f
@ -389,9 +389,11 @@ class IStrategy(ABC):
|
|||||||
trade.adjust_stop_loss(high or current_rate, stop_loss_value)
|
trade.adjust_stop_loss(high or current_rate, stop_loss_value)
|
||||||
|
|
||||||
# evaluate if the stoploss was hit if stoploss is not on exchange
|
# evaluate if the stoploss was hit if stoploss is not on exchange
|
||||||
|
# in Dry-Run, this handles stoploss logic as well, as the logic will not be different to
|
||||||
|
# regular stoploss handling.
|
||||||
if ((self.stoploss is not None) and
|
if ((self.stoploss is not None) and
|
||||||
(trade.stop_loss >= current_rate) and
|
(trade.stop_loss >= current_rate) and
|
||||||
(not self.order_types.get('stoploss_on_exchange'))):
|
(not self.order_types.get('stoploss_on_exchange') or self.config['dry_run'])):
|
||||||
|
|
||||||
sell_type = SellType.STOP_LOSS
|
sell_type = SellType.STOP_LOSS
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user