Calcul 20240101-20250714 3709.537 264.11$ Max 8

This commit is contained in:
Jérôme Delacotte
2025-07-21 11:35:57 +02:00
parent 9cce16610d
commit 27847fea95
2 changed files with 3847 additions and 2628 deletions

View File

@@ -713,12 +713,12 @@ class Zeus_8_3_2_B_4_2(IStrategy):
# poly_func, x_future, y_future, count = self.polynomial_forecast(informative['sma5_deriv1_1d'], window=24, degree=4)
informative['futur_percent_3'] = 100 * ((informative['sma5'].shift(-3) - informative['sma5']) / informative['sma5'])
futur_cols = ['futur_percent_3']
indic_1 = 'sma5_deriv1'
indic_2 = 'sma20_deriv1'
self.calculateProbabilite2Index(informative, futur_cols, indic_1, indic_2)
# informative['futur_percent_3'] = 100 * ((informative['sma5'].shift(-3) - informative['sma5']) / informative['sma5'])
# futur_cols = ['futur_percent_3']
# indic_1 = 'sma5_deriv1'
# indic_2 = 'sma20_deriv1'
#
# self.calculateProbabilite2Index(informative, futur_cols, indic_1, indic_2)
dataframe = merge_informative_pair(dataframe, informative, self.timeframe, "1d", ffill=True)
@@ -1890,11 +1890,11 @@ class Zeus_8_3_2_B_4_2(IStrategy):
limit = 3
if pair.startswith('BTC'):
if pair.startswith('BTC') or self.pairs[pair]['count_of_buys'] == 0:
return True # BTC toujours autorisé
# 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
max_nb_trades = 0
@@ -1906,7 +1906,7 @@ class Zeus_8_3_2_B_4_2(IStrategy):
max_pair = p
total_non_btc += self.pairs[p]['count_of_buys']
pct_max = self.getPctFirstBuy(pair, last_candle) #self.getPctLastBuy(pair, last_candle)
pct_max = self.getPctLastBuy(pair, last_candle)
# val = self.getProbaHausse(last_candle)
# if (val < 40):
@@ -1921,6 +1921,6 @@ class Zeus_8_3_2_B_4_2(IStrategy):
self.should_enter_trade_count = 0
if max_pair != '' :
return max_pair == pair or pct_max < - 0.25
return (max_pair == pair and self.pairs[pair]['count_of_buys'] <= 5) or pct_max < - 0.1
else:
return True