From 83102191c05fc6f1eda5d5d450786fd49bcf36cc Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Thu, 3 Jul 2025 12:00:13 +0200 Subject: [PATCH] refactor(qav3): cleanup magic numbers handling MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- quickadapter/user_data/strategies/QuickAdapterV3.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/quickadapter/user_data/strategies/QuickAdapterV3.py b/quickadapter/user_data/strategies/QuickAdapterV3.py index b54a826..5220abb 100644 --- a/quickadapter/user_data/strategies/QuickAdapterV3.py +++ b/quickadapter/user_data/strategies/QuickAdapterV3.py @@ -394,14 +394,14 @@ class QuickAdapterV3(IStrategy): if isinstance(label_natr_ratio, float) and np.isfinite(label_natr_ratio): self._label_params[pair]["label_natr_ratio"] = label_natr_ratio - def get_entry_natr_ratio(self, pair: str) -> float: - return self.get_label_natr_ratio(pair) * 0.01 + def get_entry_natr_ratio(self, pair: str, percent: float = 0.01) -> float: + return self.get_label_natr_ratio(pair) * percent - def get_stoploss_natr_ratio(self, pair: str) -> float: - return self.get_label_natr_ratio(pair) * 0.9 + def get_stoploss_natr_ratio(self, pair: str, percent: float = 0.9) -> float: + return self.get_label_natr_ratio(pair) * percent - def get_take_profit_natr_ratio(self, pair: str) -> float: - return self.get_label_natr_ratio(pair) * 0.7 + def get_take_profit_natr_ratio(self, pair: str, percent: float = 0.7) -> float: + return self.get_label_natr_ratio(pair) * percent @staticmethod def td_format( -- 2.43.0