diff --git a/NostalgiaForInfinityX5.py b/NostalgiaForInfinityX5.py index cf5c3df3e6..362f683895 100644 --- a/NostalgiaForInfinityX5.py +++ b/NostalgiaForInfinityX5.py @@ -66,7 +66,7 @@ class NostalgiaForInfinityX5(IStrategy): INTERFACE_VERSION = 3 def version(self) -> str: - return "v15.1.244" + return "v15.1.245" stoploss = -0.99 @@ -24264,7 +24264,7 @@ def long_exit_stoploss( current_time: "datetime", buy_tag, ) -> tuple: - is_backtest = self.dp.runmode.value in ["backtest", "hyperopt"] + is_backtest = self.is_backtest_mode # Stoploss doom if ( profit_stake @@ -24273,6 +24273,7 @@ def long_exit_stoploss( * (self.stop_threshold_doom_futures if self.is_futures_mode else self.stop_threshold_doom_spot) / trade.leverage ) + and not self.has_valid_entry_conditions(last_candle, "long") # temporary and (trade.open_date_utc.replace(tzinfo=None) >= datetime(2024, 9, 13) or is_backtest) ): @@ -41303,7 +41304,7 @@ def short_exit_stoploss( current_time: "datetime", buy_tag, ) -> tuple: - is_backtest = self.dp.runmode.value in ["backtest", "hyperopt"] + is_backtest = self.is_backtest_mode # Stoploss doom if ( profit_stake @@ -41312,6 +41313,7 @@ def short_exit_stoploss( * (self.stop_threshold_doom_futures if self.is_futures_mode else self.stop_threshold_doom_spot) / trade.leverage ) + and not self.has_valid_entry_conditions(last_candle, "short") # temporary and (trade.open_date_utc.replace(tzinfo=None) >= datetime(2024, 9, 13) or is_backtest) ):