Calcul 20250101-20250714 1059.206 217 max 11 ETH
This commit is contained in:
@@ -731,7 +731,8 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
|||||||
informative['volatility'] = talib.STDDEV(informative['close'], timeperiod=14) / informative['close']
|
informative['volatility'] = talib.STDDEV(informative['close'], timeperiod=14) / informative['close']
|
||||||
self.calculeDerivees(informative, 'volatility')
|
self.calculeDerivees(informative, 'volatility')
|
||||||
|
|
||||||
# informative['rsi'] = talib.RSI(informative['close']) #, timeperiod=7)
|
informative["percent"] = (informative["close"] - informative["open"]) / informative["open"]
|
||||||
|
informative['rsi6'] = talib.RSI(informative['close'], timeperiod=6)
|
||||||
# self.calculeDerivees(informative, 'rsi')
|
# self.calculeDerivees(informative, 'rsi')
|
||||||
#
|
#
|
||||||
informative['sma5'] = talib.SMA(informative, timeperiod=5)
|
informative['sma5'] = talib.SMA(informative, timeperiod=5)
|
||||||
@@ -740,6 +741,9 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
|||||||
self.calculeDerivees(informative, 'sma5', factor_1=10, factor_2=1)
|
self.calculeDerivees(informative, 'sma5', factor_1=10, factor_2=1)
|
||||||
self.calculeDerivees(informative, 'sma20', factor_1=10, factor_2=1)
|
self.calculeDerivees(informative, 'sma20', factor_1=10, factor_2=1)
|
||||||
|
|
||||||
|
informative['inversion_haute'] = (informative['sma20'].shift(2) < informative['sma20'].shift(1)) & (informative['sma20'].shift(1) > informative['sma20'])
|
||||||
|
informative['inversion_basse'] = (informative['sma20'].shift(2) > informative['sma20'].shift(1)) & (informative['sma20'].shift(1) < informative['sma20'])
|
||||||
|
|
||||||
# informative['futur_percent_3'] = 100 * ((informative['sma5'].shift(-3) - informative['sma5']) / informative['sma5'])
|
# informative['futur_percent_3'] = 100 * ((informative['sma5'].shift(-3) - informative['sma5']) / informative['sma5'])
|
||||||
|
|
||||||
# if self.dp.runmode.value in ('backtest'):
|
# if self.dp.runmode.value in ('backtest'):
|
||||||
@@ -1984,6 +1988,21 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
|||||||
|
|
||||||
limit = 3
|
limit = 3
|
||||||
|
|
||||||
|
# if self.pairs[pair]['count_of_buys'] > 3:
|
||||||
|
# if last_candle['inversion_basse_1d']:
|
||||||
|
# if self.pairs[pair]['stop'] == True :
|
||||||
|
# self.pairs[pair]['stop'] = False
|
||||||
|
# print(f"start buying {last_candle['sma20_deriv1_1d']} {last_candle['sma20_deriv2_1d']}")
|
||||||
|
# else:
|
||||||
|
# if last_candle['inversion_haute_1d']:
|
||||||
|
# if self.pairs[pair]['stop'] == False:
|
||||||
|
# self.pairs[pair]['stop'] = True
|
||||||
|
# print(f"stop buying {last_candle['rsi6_1d']} {last_candle['percent_1d']} {last_candle['sma20_deriv1_1d']} {last_candle['sma20_deriv2_1d']}")
|
||||||
|
# return False
|
||||||
|
#
|
||||||
|
# if self.pairs[pair]['stop']:
|
||||||
|
# return False
|
||||||
|
|
||||||
if pair.startswith('BTC'):
|
if pair.startswith('BTC'):
|
||||||
return True # BTC toujours autorisé
|
return True # BTC toujours autorisé
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user