From 7a55dd25656956c2f50246a5bd33d101e493e3aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Delacotte?= Date: Sun, 28 Sep 2025 15:32:36 +0200 Subject: [PATCH] TEST SELL --- Zeus_8_3_2_B_4_2.json | 8 ++++---- Zeus_8_3_2_B_4_2.py | 23 ++++++++++++++++------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/Zeus_8_3_2_B_4_2.json b/Zeus_8_3_2_B_4_2.json index f2771d2..a5e6228 100644 --- a/Zeus_8_3_2_B_4_2.json +++ b/Zeus_8_3_2_B_4_2.json @@ -22,12 +22,12 @@ }, "sell": {}, "protection": { - "sma5_deriv1_1d_restart_protection": 0.06, - "sma5_deriv1_1d_stop_protection": -0.03, + "sma5_deriv1_1d_restart_protection": 2.2, + "sma5_deriv1_1d_stop_protection": -3.9, "sma5_deriv2_1d_restart_protection": 0.0, - "sma5_deriv2_1d_stop_protection": 0.0 + "sma5_deriv2_1d_stop_protection": -4.8 } }, "ft_stratparam_v": 1, - "export_time": "2025-09-27 19:01:48.513825+00:00" + "export_time": "2025-09-28 00:05:42.543940+00:00" } \ No newline at end of file diff --git a/Zeus_8_3_2_B_4_2.py b/Zeus_8_3_2_B_4_2.py index 46c239c..d4ff57c 100644 --- a/Zeus_8_3_2_B_4_2.py +++ b/Zeus_8_3_2_B_4_2.py @@ -213,20 +213,28 @@ class Zeus_8_3_2_B_4_2(IStrategy): # sma20_deriv1_1d_stop_protection = DecimalParameter(-0.2, 0.2, default=0.05, decimals=2, space='protection', # optimize=True, load=True) - sma5_deriv1_1d_stop_protection = DecimalParameter(-0.2, 0, default=0.05, decimals=2, space='protection', + sma5_deriv1_1d_stop_protection = DecimalParameter(-5, 0, default=0.5, decimals=1, space='protection', optimize=True, load=True) - sma5_deriv2_1d_stop_protection = DecimalParameter(-0.2, 0, default=0.05, decimals=1, space='protection', optimize=True, + sma5_deriv2_1d_stop_protection = DecimalParameter(-5, 0, default=0.5, decimals=1, space='protection', optimize=True, load=True) # sma20_deriv1_1d_start_protection = DecimalParameter(-0.2, 0.2, default=0.05, decimals=2, space='protection', # optimize=True, load=True) - sma5_deriv1_1d_restart_protection = DecimalParameter(0, 0.2, default=0.05, decimals=2, space='protection', + sma5_deriv1_1d_restart_protection = DecimalParameter(0, 5, default=0.5, decimals=1, space='protection', optimize=True, load=True) - sma5_deriv2_1d_restart_protection = DecimalParameter(0, 0.2, default=0.05, decimals=1, space='protection', optimize=True, + sma5_deriv2_1d_restart_protection = DecimalParameter(0, 5, default=0.5, decimals=1, space='protection', optimize=True, load=True) mise_factor_buy = DecimalParameter(0.01, 0.2, default=0.05, decimals=2, space='buy', optimize=True, load=True) + sma5_deriv1_1d_stop_sell = DecimalParameter(-5, 5, default=0.5, decimals=1, space='sell', + optimize=True, load=True) + sma5_deriv2_1d_stop_sell = DecimalParameter(-5, 5, default=0.5, decimals=1, space='sell', optimize=True, + load=True) + sma5_deriv1_1h_stop_sell = DecimalParameter(-5, 5, default=0.5, decimals=1, space='sell', + optimize=True, load=True) + sma5_deriv2_1h_stop_sell = DecimalParameter(-5, 5, default=0.5, decimals=1, space='sell', optimize=True, + load=True) # Récupération des labels ordonnés # labels = ['B5', 'B4', 'B3', 'B2', 'B1', 'N0', 'H1', 'H2', 'H3', 'H4', 'H5'] # index_labels = ['B5', 'B4', 'B3', 'B2', 'B1', 'N0', 'H1', 'H2', 'H3', 'H4', 'H5'] @@ -461,9 +469,10 @@ class Zeus_8_3_2_B_4_2(IStrategy): stake=0 ) - if last_candle['sma20_deriv1_1d'] > 0 and last_candle['sma5_deriv1_1d'] > 0 and last_candle[ - 'mid_smooth_1h_deriv1'] > 0 \ - and last_candle['mid_smooth_1h_deriv2'] > 0: + if last_candle['mid_smooth_5_deriv1_1d'] > self.sma5_deriv1_1d_stop_sell.value \ + and last_candle['mid_smooth_5_deriv2_1d'] > self.sma5_deriv2_1d_stop_sell.value \ + and last_candle['mid_smooth_1h_deriv1'] > self.sma5_deriv1_1h_stop_sell.value \ + and last_candle['mid_smooth_1h_deriv2'] > self.sma5_deriv2_1h_stop_sell.value: return None # if (last_candle['mid_smooth_deriv1'] >= 0):