Zeus_8_3_2_B_4_2 test Paliers
This commit is contained in:
29
Zeus_8_1d.py
29
Zeus_8_1d.py
@@ -29,6 +29,8 @@ from datetime import timezone, timedelta
|
||||
from scipy.signal import savgol_filter
|
||||
from ta.trend import SMAIndicator, EMAIndicator, MACD, ADXIndicator
|
||||
from collections import Counter
|
||||
from scipy.signal import savgol_filter
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -571,12 +573,14 @@ class Zeus_8_1d(IStrategy):
|
||||
dataframe['haclose'] = heikinashi['close']
|
||||
dataframe['hapercent'] = (dataframe['haclose'] - dataframe['haopen']) / dataframe['haclose']
|
||||
dataframe['hapercent3'] = (dataframe['haclose'] - dataframe['haopen'].shift(3)) / dataframe['haclose'].shift(3)
|
||||
dataframe['mid'] = dataframe['haopen'] + (dataframe['haclose'] - dataframe['haopen']) / 2
|
||||
|
||||
dataframe['sma5'] = dataframe["mid"].rolling(window=5).mean() #talib.SMA(informative, timeperiod=5)
|
||||
dataframe['sma5'] = talib.SMA(dataframe, timeperiod=5)
|
||||
self.calculeDerivees(dataframe, 'sma5', horizon=10)
|
||||
dataframe['sma10'] = talib.SMA(dataframe, timeperiod=10)
|
||||
dataframe['sma10'] = dataframe["mid"].rolling(window=10).mean() #dataframe['sma10'] = talib.SMA(dataframe, timeperiod=10)
|
||||
self.calculeDerivees(dataframe, 'sma10', horizon=10)
|
||||
dataframe['sma20'] = talib.SMA(dataframe, timeperiod=20)
|
||||
dataframe['sma20'] = dataframe["mid"].rolling(window=20).mean() #dataframe['sma20'] = talib.SMA(dataframe, timeperiod=20)
|
||||
self.calculeDerivees(dataframe, 'sma20', horizon=20)
|
||||
|
||||
dataframe["percent"] = (dataframe["close"] - dataframe["open"]) / dataframe["open"]
|
||||
@@ -719,8 +723,8 @@ class Zeus_8_1d(IStrategy):
|
||||
informative['haclose'] = heikinashi['close']
|
||||
informative['hapercent'] = (informative['haclose'] - informative['haopen']) / informative['haclose']
|
||||
informative = self.calculateDerivation(informative, window=5, suffixe="_5")
|
||||
informative['sma5'] = talib.SMA(informative, timeperiod=5)
|
||||
informative['sma20'] = talib.SMA(informative, timeperiod=20)
|
||||
informative['sma5'] = informative["mid"].rolling(window=5).mean() #talib.SMA(informative, timeperiod=5)
|
||||
informative['sma20'] = informative["mid"].rolling(window=20).mean() #talib.SMA(informative, timeperiod=20)
|
||||
informative['max60'] = talib.MAX(informative['close'], timeperiod=60)
|
||||
informative['min60'] = talib.MIN(informative['close'], timeperiod=60)
|
||||
|
||||
@@ -731,6 +735,23 @@ class Zeus_8_1d(IStrategy):
|
||||
self.calculateProbabilite2Index(informative, futur_cols, indic_1, indic_2)
|
||||
dataframe = merge_informative_pair(dataframe, informative, self.timeframe, "1d", ffill=True)
|
||||
|
||||
# --- pente brute ---
|
||||
dataframe['slope'] = dataframe['sma20'].diff()
|
||||
|
||||
# --- lissage EMA ---
|
||||
dataframe['slope_smooth'] = dataframe['slope'].ewm(span=10, adjust=False).mean()
|
||||
|
||||
# --- normalisation relative ---
|
||||
dataframe['slope_norm'] = 100 * dataframe['slope_smooth'] / dataframe['close']
|
||||
# df['slope_norm'].fillna(0, inplace=True)
|
||||
dataframe['slope_norm'] = dataframe['slope_norm'].fillna(0)
|
||||
|
||||
# EMA plus réactive (span=5)
|
||||
dataframe["ema5"] = dataframe["mid_smooth_5"].ewm(span=5, adjust=False).mean()
|
||||
|
||||
# EMA plus lissée (span=20)
|
||||
dataframe["ema20"] = dataframe["mid"].ewm(span=20, adjust=False).mean()
|
||||
|
||||
return dataframe
|
||||
|
||||
def calculeDerivees(self, dataframe, indic, factor_1=100, factor_2=10, horizon=5):
|
||||
|
||||
@@ -17,17 +17,27 @@
|
||||
"max_open_trades": 80
|
||||
},
|
||||
"buy": {
|
||||
"buy_horizon_predict_1h": 2,
|
||||
"mise_factor_buy": 0.06
|
||||
"indic_5m": "mid_smooth_5",
|
||||
"indic_deriv1_5m": -1.52,
|
||||
"indic_deriv2_5m": -0.15,
|
||||
"mise_factor_buy": 0.1,
|
||||
"mises": 10,
|
||||
"pct": 0.012,
|
||||
"pct_inc": 0.005
|
||||
},
|
||||
"sell": {
|
||||
"indic_5m_sell": "mid_smooth_24",
|
||||
"indic_deriv1_5m_sell": -1.93,
|
||||
"indic_deriv2_5m_sell": -1.4
|
||||
},
|
||||
"sell": {},
|
||||
"protection": {
|
||||
"sma5_deriv1_1d_restart_protection": 2.2,
|
||||
"sma5_deriv1_1d_stop_protection": -3.9,
|
||||
"sma5_deriv2_1d_restart_protection": 0.0,
|
||||
"sma5_deriv2_1d_stop_protection": -4.8
|
||||
"indic_1d_p": "mid_smooth_24",
|
||||
"indic_deriv1_1d_p_start": -1.9,
|
||||
"indic_deriv1_1d_p_stop": 1.1,
|
||||
"indic_deriv2_1d_p_start": 3.7,
|
||||
"indic_deriv2_1d_p_stop": -0.9
|
||||
}
|
||||
},
|
||||
"ft_stratparam_v": 1,
|
||||
"export_time": "2025-09-28 13:58:28.838866+00:00"
|
||||
"export_time": "2025-10-26 16:32:08.937921+00:00"
|
||||
}
|
||||
1075
Zeus_8_3_2_B_4_2.py
1075
Zeus_8_3_2_B_4_2.py
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user