Calcul 20250101-20250714 1131.211 253.11$
This commit is contained in:
@@ -1105,15 +1105,15 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
|||||||
pct_max = - pct
|
pct_max = - pct
|
||||||
|
|
||||||
if pair in ('BTC/USDT', 'BTC/USDC') or count_of_buys <= 2:
|
if pair in ('BTC/USDT', 'BTC/USDC') or count_of_buys <= 2:
|
||||||
lim = - pct - (count_of_buys * 0.003)
|
lim = - pct - (count_of_buys * 0.001)
|
||||||
#lim = self.getLimitBuy(pair, last_candle, pct)
|
#lim = self.getLimitBuy(pair, last_candle, pct)
|
||||||
# lim = - (0.012 * (1 + round(count_of_buys / 5)) + 0.001 * (count_of_buys - 1))
|
# lim = - (0.012 * (1 + round(count_of_buys / 5)) + 0.001 * (count_of_buys - 1))
|
||||||
# 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))
|
# 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:
|
else:
|
||||||
pct = 0.025
|
pct = 0.05
|
||||||
# lim = - pct - (count_of_buys * 0.001)
|
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):
|
if (len(dataframe) < 1):
|
||||||
print("skip dataframe")
|
print("skip dataframe")
|
||||||
@@ -1391,34 +1391,21 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
|||||||
# Calculer le minimum des 14 derniers jours
|
# Calculer le minimum des 14 derniers jours
|
||||||
base_stake_amount = self.config.get('stake_amount') # Montant de base configuré
|
base_stake_amount = self.config.get('stake_amount') # Montant de base configuré
|
||||||
|
|
||||||
# last_candle['max60_1d'] - last_candle['min60_1d']
|
if not pair in ('BTC/USDT', 'BTC/USDC'):
|
||||||
last_max = self.pairs[pair]['last_max']
|
# factors = [1, 1.2, 1.3, 1.4]
|
||||||
last_min = self.pairs[pair]['last_min']
|
adjusted_stake_amount = base_stake_amount
|
||||||
|
else :
|
||||||
|
first_price = self.pairs[pair]['first_buy']
|
||||||
|
if (first_price == 0):
|
||||||
|
first_price = last_candle['close']
|
||||||
|
|
||||||
ecart = 1
|
last_max = last_candle['max12_1d']
|
||||||
if (last_max > 0 and last_min > 0):
|
pct = 5
|
||||||
ecart = 1 + (last_max - last_min) / last_max
|
if last_max > 0:
|
||||||
|
pct = 100 * (last_max - first_price) / last_max
|
||||||
|
|
||||||
adjusted_stake_amount = base_stake_amount * ecart
|
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))
|
||||||
# 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))
|
# pct = 100 * abs(self.getPctFirstBuy(pair, last_candle))
|
||||||
#
|
#
|
||||||
@@ -1475,7 +1462,7 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
|||||||
if last_candle['close'] < max_60:
|
if last_candle['close'] < max_60:
|
||||||
pct_to_max = 0.25 * (max_60 - last_candle['close']) / max_60
|
pct_to_max = 0.25 * (max_60 - last_candle['close']) / max_60
|
||||||
|
|
||||||
expected_profit = pct_to_max # 0.004 + 0.002 * self.pairs[pair]['count_of_buys'] #min(0.01, first_max)
|
expected_profit = max(0.004, pct_to_max) # 0.004 + 0.002 * self.pairs[pair]['count_of_buys'] #min(0.01, first_max)
|
||||||
|
|
||||||
# print(
|
# print(
|
||||||
# f"Expected profit price={current_price:.4f} min_max={min_max:.4f} min_14={min_14_days:.4f} max_14={max_14_days:.4f} percent={percent:.4f} expected_profit={expected_profit:.4f}")
|
# f"Expected profit price={current_price:.4f} min_max={min_max:.4f} min_14={min_14_days:.4f} max_14={max_14_days:.4f} percent={percent:.4f} expected_profit={expected_profit:.4f}")
|
||||||
@@ -1993,11 +1980,11 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
|||||||
|
|
||||||
limit = 3
|
limit = 3
|
||||||
|
|
||||||
if pair.startswith('BTC') or self.pairs[pair]['count_of_buys'] == 0:
|
if pair.startswith('BTC'):
|
||||||
return True # BTC toujours autorisé
|
return True # BTC toujours autorisé
|
||||||
|
|
||||||
# Filtrer les paires non-BTC
|
# Filtrer les paires non-BTC
|
||||||
non_btc_pairs = [p for p in self.pairs] # if not p.startswith('BTC')]
|
non_btc_pairs = [p for p in self.pairs if not p.startswith('BTC')]
|
||||||
|
|
||||||
# Compter les positions actives sur les paires non-BTC
|
# Compter les positions actives sur les paires non-BTC
|
||||||
max_nb_trades = 0
|
max_nb_trades = 0
|
||||||
@@ -2009,11 +1996,11 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
|||||||
max_pair = p
|
max_pair = p
|
||||||
total_non_btc += self.pairs[p]['count_of_buys']
|
total_non_btc += self.pairs[p]['count_of_buys']
|
||||||
|
|
||||||
pct_max = self.getPctLastBuy(pair, last_candle)
|
pct_max = self.getPctFirstBuy(pair, last_candle) #self.getPctLastBuy(pair, last_candle)
|
||||||
|
|
||||||
# val = self.getProbaHausse(last_candle)
|
val = self.getProbaHausseSma5d(last_candle)
|
||||||
# if (val < 40):
|
if (val < 15):
|
||||||
# return False
|
return False
|
||||||
|
|
||||||
# if count_decrease == len(non_btc_pairs):
|
# if count_decrease == len(non_btc_pairs):
|
||||||
# self.should_enter_trade_count += 1
|
# self.should_enter_trade_count += 1
|
||||||
@@ -2028,6 +2015,6 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
|||||||
self.should_enter_trade_count = 0
|
self.should_enter_trade_count = 0
|
||||||
|
|
||||||
if max_pair != '' :
|
if max_pair != '' :
|
||||||
return (max_pair == pair and self.pairs[pair]['count_of_buys'] <= 5) or pct_max < - 0.1
|
return max_pair == pair or pct_max < - 0.25
|
||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user