Ensure non-defined attributes fail correctly

Remove unnecessary check, as stoploss cannot be none (it's mandatory and
a number)
This commit is contained in:
Matthias
2020-12-09 07:52:58 +01:00
parent d9a86158f4
commit f1af2972e2
3 changed files with 21 additions and 12 deletions

View File

@@ -551,8 +551,7 @@ class IStrategy(ABC):
# 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
(trade.stop_loss >= current_rate) and
if ((trade.stop_loss >= current_rate) and
(not self.order_types.get('stoploss_on_exchange') or self.config['dry_run'])):
sell_type = SellType.STOP_LOSS