mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
feat: fail if edge is in config
This commit is contained in:
@@ -99,14 +99,12 @@ def validate_config_consistency(conf: dict[str, Any], *, preliminary: bool = Fal
|
|||||||
|
|
||||||
def _validate_unlimited_amount(conf: dict[str, Any]) -> None:
|
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
|
:raise: ConfigurationError if config validation failed
|
||||||
"""
|
"""
|
||||||
if (
|
if (
|
||||||
not conf.get("edge", {}).get("enabled")
|
conf.get("max_open_trades") == float("inf") or conf.get("max_open_trades") == -1
|
||||||
and (conf.get("max_open_trades") == float("inf") or conf.get("max_open_trades") == -1)
|
) and conf.get("stake_amount") == UNLIMITED_STAKE_AMOUNT:
|
||||||
and conf.get("stake_amount") == UNLIMITED_STAKE_AMOUNT
|
|
||||||
):
|
|
||||||
raise ConfigurationError("`max_open_trades` and `stake_amount` cannot both be unlimited.")
|
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.
|
Edge and Dynamic whitelist should not both be enabled, since edge overrides dynamic whitelists.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if not conf.get("edge", {}).get("enabled"):
|
if conf.get("edge", {}).get("enabled"):
|
||||||
return
|
|
||||||
|
|
||||||
if not conf.get("use_exit_signal", True):
|
|
||||||
raise ConfigurationError(
|
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."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user