diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index 9d6807fa2..3085e9ac9 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -879,19 +879,20 @@ class Exchange: # Only allow 5 calls per pair to somewhat limit the impact raise ConfigurationError( f"This strategy requires {startup_candles} candles to start, " - "which is more than 5x " + f"which is more than 5x ({candle_limit * 5 - 1} candles) " f"the amount of candles {self.name} provides for {timeframe}." ) elif required_candle_call_count > 1: raise ConfigurationError( - f"This strategy requires {startup_candles} candles to start, which is more than " + f"This strategy requires {startup_candles} candles to start, " + f"which is more than ({candle_limit - 1} candles) " f"the amount of candles {self.name} provides for {timeframe}." ) if required_candle_call_count > 1: logger.warning( f"Using {required_candle_call_count} calls to get OHLCV. " f"This can result in slower operations for the bot. Please check " - f"if you really need {startup_candles} candles for your strategy" + f"if you really need {startup_candles} candles for your strategy." ) return required_candle_call_count diff --git a/tests/exchange/test_exchange.py b/tests/exchange/test_exchange.py index 5772a1c4a..94428cbbf 100644 --- a/tests/exchange/test_exchange.py +++ b/tests/exchange/test_exchange.py @@ -1012,7 +1012,7 @@ def test_validate_required_startup_candles(default_conf, mocker, caplog): ex._ft_has["ohlcv_has_history"] = False with pytest.raises( OperationalException, - match=r"This strategy requires 2500.*, " r"which is more than the amount.*", + match=r"This strategy requires 2500.*, " r"which is more than .* the amount", ): ex.validate_required_startup_candles(2500, "5m")