From d0ac71f60d9753cd5123b7e047e0d2fecb0ab8b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Delacotte?= Date: Thu, 24 Jul 2025 13:47:54 +0200 Subject: [PATCH] modification can_buy --- Zeus_8_3_2_B_4_2.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Zeus_8_3_2_B_4_2.py b/Zeus_8_3_2_B_4_2.py index 051d415..f3f32e6 100644 --- a/Zeus_8_3_2_B_4_2.py +++ b/Zeus_8_3_2_B_4_2.py @@ -182,7 +182,8 @@ class Zeus_8_3_2_B_4_2(IStrategy): 'last_date': 0, 'stop': False, 'max_profit': 0, - 'last_palier_index': -1 + 'last_palier_index': -1, + 'total_amount': 0 } for pair in ["BTC/USDC", "ETH/USDC", "DOGE/USDC", "XRP/USDC", "SOL/USDC", "BTC/USDT", "ETH/USDT", "DOGE/USDT", "XRP/USDT", "SOL/USDT"] @@ -951,8 +952,8 @@ class Zeus_8_3_2_B_4_2(IStrategy): dataframe['can_sell'] = np.where(((dataframe['mid_smooth_1h_deriv1'].shift(2) <= dataframe['mid_smooth_1h_deriv1'].shift(1))\ & (dataframe['mid_smooth_1h_deriv1'].shift(1) >= dataframe['mid_smooth_1h_deriv1'])), dataframe['close'], np.nan) - dataframe['can_buy'] = np.where(((dataframe['mid_smooth_1h_deriv1'].shift(2) >= dataframe['mid_smooth_1h_deriv1'].shift(1))\ - & (dataframe['mid_smooth_1h_deriv1'].shift(1) <= dataframe['mid_smooth_1h_deriv1'])), dataframe['close'], np.nan) + dataframe['can_buy'] = np.where(((dataframe['mid_smooth_12_deriv2'].shift(1) < 0)\ + & (dataframe['mid_smooth_12_deriv2'].shift(1) <= dataframe['mid_smooth_12_deriv2'])), dataframe['close'], np.nan) dataframe['test'] = np.where(dataframe['enter_long'] == 1, dataframe['close'] * 1.01, np.nan) dataframe['perte_02'] = np.where((dataframe['percent3'] * 100 < -0.2), dataframe['close'], np.nan)