Ajout sma5_deriv1_1h

This commit is contained in:
Jérôme Delacotte
2025-07-23 23:58:56 +02:00
parent 77e7f797fe
commit 96976e842d

View File

@@ -505,7 +505,7 @@ class Zeus_8_3_2_B_4_2(IStrategy):
if self.columns_logged % 30 == 0: if self.columns_logged % 30 == 0:
self.printLog( self.printLog(
f"| {'Date':<16} | {'Action':<10} |{'Pair':<5}| {'Trade Type':<18} |{'Rate':>8} | {'Dispo':>6} | {'Profit':>8} | {'Pct':>6} | {'max_touch':>11} | {'last_lost':>12} | {'last_max':>7}| {'last_max':>7}|{'Buys':>5}| {'Stake':>5} |" f"| {'Date':<16} | {'Action':<10} |{'Pair':<5}| {'Trade Type':<18} |{'Rate':>8} | {'Dispo':>6} | {'Profit':>8} | {'Pct':>6} | {'max_touch':>11} | {'last_lost':>12} | {'last_max':>7}| {'last_max':>7}|{'Buys':>5}| {'Stake':>5} |"
f"Tdc|{'val':>6}|Distmax|s201d|s5_1d|s5_2d|smt1h|smt2h|" f"Tdc|{'val':>6}|Distmax|s201d|s5_1d|s5_2d|s5_1h|s5_2h|smt1h|smt2h|"
) )
self.printLineLog() self.printLineLog()
df = pd.DataFrame.from_dict(self.pairs, orient='index') df = pd.DataFrame.from_dict(self.pairs, orient='index')
@@ -571,6 +571,8 @@ class Zeus_8_3_2_B_4_2(IStrategy):
color_sma20 = GREEN if last_candle['sma20_deriv1_1d'] > 0 else RED color_sma20 = GREEN if last_candle['sma20_deriv1_1d'] > 0 else RED
color_sma5 = GREEN if last_candle['sma5_deriv1_1d'] > 0 else RED color_sma5 = GREEN if last_candle['sma5_deriv1_1d'] > 0 else RED
color_sma5_2 = GREEN if last_candle['sma5_deriv2_1d'] > 0 else RED color_sma5_2 = GREEN if last_candle['sma5_deriv2_1d'] > 0 else RED
color_sma5_1h = GREEN if last_candle['sma24_deriv1_1h'] > 0 else RED
color_sma5_2h = GREEN if last_candle['sma24_deriv2_1h'] > 0 else RED
color_smooth_1h = GREEN if last_candle['mid_smooth_1h_deriv1'] > 0 else RED color_smooth_1h = GREEN if last_candle['mid_smooth_1h_deriv1'] > 0 else RED
color_smooth2_1h = GREEN if last_candle['mid_smooth_1h_deriv2'] > 0 else RED color_smooth2_1h = GREEN if last_candle['mid_smooth_1h_deriv2'] > 0 else RED
@@ -587,8 +589,9 @@ class Zeus_8_3_2_B_4_2(IStrategy):
f"{round(val, 1) or '-' :>6}|" f"{round(val, 1) or '-' :>6}|"
f"{dist_max:>7}|{color_sma20}{round(last_candle['sma20_deriv1_1d'],2):>5}{RESET}" f"{dist_max:>7}|{color_sma20}{round(last_candle['sma20_deriv1_1d'],2):>5}{RESET}"
f"|{color_sma5}{round(last_candle['sma5_deriv1_1d'],2):>5}{RESET}|{color_sma5_2}{round(last_candle['sma5_deriv2_1d'],2):>5}{RESET}" f"|{color_sma5}{round(last_candle['sma5_deriv1_1d'],2):>5}{RESET}|{color_sma5_2}{round(last_candle['sma5_deriv2_1d'],2):>5}{RESET}"
f"|{color_sma5_1h}{round(last_candle['sma24_deriv1_1h'], 2):>5}{RESET}|{color_sma5_2h}{round(last_candle['sma24_deriv2_1h'], 2):>5}{RESET}"
f"|{color_smooth_1h}{round(last_candle['mid_smooth_1h_deriv1'],2):>5}{RESET}|{color_smooth2_1h}{round(last_candle['mid_smooth_1h_deriv2'],2):>5}{RESET}" f"|{color_smooth_1h}{round(last_candle['mid_smooth_1h_deriv1'],2):>5}{RESET}|{color_smooth2_1h}{round(last_candle['mid_smooth_1h_deriv2'],2):>5}{RESET}"
f"|{last_candle['min60_1d']}|{last_candle['max60_1d']}" # f"|{last_candle['min60_1d']}|{last_candle['max60_1d']}"
) )
def printLineLog(self): def printLineLog(self):
@@ -597,7 +600,7 @@ class Zeus_8_3_2_B_4_2(IStrategy):
f"+{'-' * 18}+{'-' * 12}+{'-' * 5}+{'-' * 20}+{'-' * 9}+{'-' * 8}+{'-' * 10}+{'-' * 8}+{'-' * 13}+{'-' * 14}+{'-' * 9}{'-' * 9}+{'-' * 5}+{'-' * 7}+" f"+{'-' * 18}+{'-' * 12}+{'-' * 5}+{'-' * 20}+{'-' * 9}+{'-' * 8}+{'-' * 10}+{'-' * 8}+{'-' * 13}+{'-' * 14}+{'-' * 9}{'-' * 9}+{'-' * 5}+{'-' * 7}+"
f"{'-' * 3}" f"{'-' * 3}"
# "+{'-' * 3}+{'-' * 3} # "+{'-' * 3}+{'-' * 3}
f"+{'-' * 6}+{'-' * 7}+{'-' * 5}+{'-' * 5}+{'-' * 5}+{'-' * 5}+" f"+{'-' * 6}+{'-' * 7}+{'-' * 5}+{'-' * 5}+{'-' * 5}+{'-' * 5}+{'-' * 5}+{'-' * 5}+"
) )
def printLog(self, str): def printLog(self, str):
@@ -2017,6 +2020,10 @@ class Zeus_8_3_2_B_4_2(IStrategy):
# print(f"should_enter_trade canceled all pairs decreased {'':{char}>{self.should_enter_trade_count}}") # print(f"should_enter_trade canceled all pairs decreased {'':{char}>{self.should_enter_trade_count}}")
# return False # return False
# if self.pairs[pair]['count_of_buys'] >= 3:
# if last_candle['sma20_deriv1_1d'] < 0 and last_candle['sma5_deriv1_1d'] < 0 and last_candle['sma24_deriv1_1h'] < 0:
# return False
self.should_enter_trade_count = 0 self.should_enter_trade_count = 0
if max_pair != '' : if max_pair != '' :