From 5d8a3cdb316ee53da5919a2a9cda6eb359fea58d Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 10 Jun 2025 07:09:20 +0200 Subject: [PATCH] feat: fail if edge is in config --- freqtrade/configuration/config_validation.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/freqtrade/configuration/config_validation.py b/freqtrade/configuration/config_validation.py index 678db63a3..49e1f2649 100644 --- a/freqtrade/configuration/config_validation.py +++ b/freqtrade/configuration/config_validation.py @@ -99,14 +99,12 @@ def validate_config_consistency(conf: dict[str, Any], *, preliminary: bool = Fal def _validate_unlimited_amount(conf: dict[str, Any]) -> None: """ - If edge is disabled, either max_open_trades or stake_amount need to be set. + Either max_open_trades or stake_amount need to be set. :raise: ConfigurationError if config validation failed """ if ( - not conf.get("edge", {}).get("enabled") - and (conf.get("max_open_trades") == float("inf") or conf.get("max_open_trades") == -1) - and conf.get("stake_amount") == UNLIMITED_STAKE_AMOUNT - ): + conf.get("max_open_trades") == float("inf") or conf.get("max_open_trades") == -1 + ) and conf.get("stake_amount") == UNLIMITED_STAKE_AMOUNT: raise ConfigurationError("`max_open_trades` and `stake_amount` cannot both be unlimited.") @@ -164,12 +162,9 @@ def _validate_edge(conf: dict[str, Any]) -> None: Edge and Dynamic whitelist should not both be enabled, since edge overrides dynamic whitelists. """ - if not conf.get("edge", {}).get("enabled"): - return - - if not conf.get("use_exit_signal", True): + if conf.get("edge", {}).get("enabled"): raise ConfigurationError( - "Edge requires `use_exit_signal` to be True, otherwise no sells will happen." + "Edge is no longer supported and has been removed from Freqtrade with 2025.6." )