From 67ce9a41f2764727dbd9a74aa80d2ee04d6367a0 Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 20 Feb 2025 19:21:37 +0100 Subject: [PATCH] feat: implement load error when colliding methods are decected --- freqtrade/resolvers/strategy_resolver.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/freqtrade/resolvers/strategy_resolver.py b/freqtrade/resolvers/strategy_resolver.py index a3ec03e2b..b56ed8e11 100644 --- a/freqtrade/resolvers/strategy_resolver.py +++ b/freqtrade/resolvers/strategy_resolver.py @@ -242,6 +242,14 @@ class StrategyResolver(IResolver): if has_after_fill: strategy._ft_stop_uses_after_fill = True + if check_override(strategy, IStrategy, "adjust_order_price") and ( + check_override(strategy, IStrategy, "adjust_entry_price") + or check_override(strategy, IStrategy, "adjust_exit_price") + ): + raise OperationalException( + "If you implement `adjust_order_price`, `adjust_entry_price` and " + "`adjust_exit_price` will not be used. Please pick one approach for your strategy." + ) return strategy @staticmethod