Calcul 20250101-20250714 598.842 263.079 max 11

This commit is contained in:
Jérôme Delacotte
2025-07-20 20:46:11 +02:00
parent 28c33cf3b9
commit 0efc4853a7
2 changed files with 1212 additions and 5524 deletions

View File

@@ -168,7 +168,7 @@ class Zeus_8_3_2_B_4_2(IStrategy):
"last_max": 0,
"trade_info": {},
"max_touch": 0.0,
"last_min": 0.0,
"last_min": 999999999999999.5,
"last_sell": 0.0,
"last_buy": 0.0,
'count_of_buys': 0,
@@ -1058,9 +1058,9 @@ class Zeus_8_3_2_B_4_2(IStrategy):
# lim = - (0.012 + 0.001 * (count_of_buys - 1) + (0.002 * count_of_buys if count_of_buys > 10 else 0.001 * count_of_buys if count_of_buys > 5 else 0))
else:
pct = 0.05
pct = 0.025
lim = - pct - (count_of_buys * 0.001)
#lim = self.getLimitBuy(pair, last_candle, pct)
lim = self.getLimitBuy(pair, last_candle, pct)
if (len(dataframe) < 1):
print("skip dataframe")
@@ -1184,8 +1184,7 @@ class Zeus_8_3_2_B_4_2(IStrategy):
# or ((before_last_candle['mid_smooth_1h_deriv1'] <= 0) & (last_candle['mid_smooth_1h_deriv1'] >= 0) & (6 <= count_of_buys))
limit_buy = 40
if (count_of_buys < limit_buy) and condition and (
pct_max < lim): # and val > self.buy_val_adjust.value and last_candle['mid_smooth_deriv1_1d'] > - 1):
if (count_of_buys < limit_buy) and condition and (pct_max < lim):
try:
# if 6 <= count_of_buys:
# if not ((before_last_candle_24['sma24_deriv1_1h'] > before_last_candle_12['sma24_deriv1_1h'])
@@ -1304,7 +1303,6 @@ class Zeus_8_3_2_B_4_2(IStrategy):
else:
# 0.1
# 0.4
lim = - first_pct - (count_of_buys * 0.001 * pct60 / 0.05)
return lim
@@ -1326,21 +1324,34 @@ class Zeus_8_3_2_B_4_2(IStrategy):
# Calculer le minimum des 14 derniers jours
base_stake_amount = self.config.get('stake_amount') # Montant de base configuré
if not pair in ('BTC/USDT', 'BTC/USDC'):
# factors = [1, 1.2, 1.3, 1.4]
adjusted_stake_amount = base_stake_amount
else :
first_price = self.pairs[pair]['first_buy']
if (first_price == 0):
first_price = last_candle['close']
# last_candle['max60_1d'] - last_candle['min60_1d']
last_max = self.pairs[pair]['last_max']
last_min = self.pairs[pair]['last_min']
last_max = last_candle['max12_1d']
pct = 5
if last_max > 0:
pct = 100 * (last_max - first_price) / last_max
ecart = 1
if (last_max > 0 and last_min > 0):
ecart = 1 + (last_max - last_min) / last_max
factor = self.multi_step_interpolate(pct, self.thresholds, self.factors)
adjusted_stake_amount = base_stake_amount * factor # max(base_stake_amount, min(100, base_stake_amount * percent_4))
adjusted_stake_amount = base_stake_amount * ecart
# if not pair in ('BTC/USDT', 'BTC/USDC'):
# # factors = [1, 1.2, 1.3, 1.4]
# adjusted_stake_amount = base_stake_amount
# else :
# # full = self.wallets.get_total_stake_amount()
# # base_stake_amount = min(100, full / self.stakes)
#
# first_price = self.pairs[pair]['first_buy']
# if (first_price == 0):
# first_price = last_candle['close']
#
# last_max = last_candle['max12_1d']
# pct = 5
# if last_max > 0:
# pct = 100 * (last_max - first_price) / last_max
#
# factor = self.multi_step_interpolate(pct, self.thresholds, self.factors)
# adjusted_stake_amount = base_stake_amount * factor # max(base_stake_amount, min(100, base_stake_amount * percent_4))
# pct = 100 * abs(self.getPctFirstBuy(pair, last_candle))
#

File diff suppressed because it is too large Load Diff