Add helper method to calculate protection until
This commit is contained in:
@@ -55,7 +55,7 @@ class StoplossGuard(IProtection):
|
||||
if len(trades) > self._trade_limit:
|
||||
self.log_on_refresh(logger.info, f"Trading stopped due to {self._trade_limit} "
|
||||
f"stoplosses within {self._lookback_period} minutes.")
|
||||
until = date_now + timedelta(minutes=self._stop_duration)
|
||||
until = self.calculate_lock_end(trades, self._stop_duration)
|
||||
return True, until, self._reason()
|
||||
|
||||
return False, None, None
|
||||
|
||||
Reference in New Issue
Block a user