travail avec close et non haclose
This commit is contained in:
@@ -318,8 +318,8 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
||||
self.pairs[pair]['count_of_buys'] = 1
|
||||
self.pairs[pair]['current_profit'] = 0
|
||||
self.pairs[pair]['last_palier_index'] = -1
|
||||
self.pairs[pair]['last_max'] = max(last_candle['haclose'], self.pairs[pair]['last_max'])
|
||||
self.pairs[pair]['last_min'] = min(last_candle['haclose'], self.pairs[pair]['last_min'])
|
||||
self.pairs[pair]['last_max'] = max(last_candle['close'], self.pairs[pair]['last_max'])
|
||||
self.pairs[pair]['last_min'] = min(last_candle['close'], self.pairs[pair]['last_min'])
|
||||
|
||||
dispo = round(self.wallets.get_available_stake_amount())
|
||||
self.printLineLog()
|
||||
@@ -409,8 +409,8 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
||||
# print(f"current_time={current_time} current_profit={current_profit} expected_profit={expected_profit}")
|
||||
|
||||
max_touch_before = self.pairs[pair]['max_touch']
|
||||
self.pairs[pair]['last_max'] = max(last_candle['haclose'], self.pairs[pair]['last_max'])
|
||||
self.pairs[pair]['last_min'] = min(last_candle['haclose'], self.pairs[pair]['last_min'])
|
||||
self.pairs[pair]['last_max'] = max(last_candle['close'], self.pairs[pair]['last_max'])
|
||||
self.pairs[pair]['last_min'] = min(last_candle['close'], self.pairs[pair]['last_min'])
|
||||
|
||||
count_of_buys = trade.nr_of_successful_entries
|
||||
|
||||
@@ -456,7 +456,7 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
||||
# self.trades = list()
|
||||
# return 'pft_' + str(count_of_buys)
|
||||
|
||||
self.pairs[pair]['max_touch'] = max(last_candle['haclose'], self.pairs[pair]['max_touch'])
|
||||
self.pairs[pair]['max_touch'] = max(last_candle['close'], self.pairs[pair]['max_touch'])
|
||||
|
||||
|
||||
def getShortName(self, pair):
|
||||
@@ -538,7 +538,7 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
||||
|
||||
sma5 = str(sma5_1d) + ' ' + str(sma5_1h)
|
||||
|
||||
last_lost = round((last_candle['haclose'] - self.pairs[pair]['max_touch']) / self.pairs[pair]['max_touch'], 3)
|
||||
last_lost = round((last_candle['close'] - self.pairs[pair]['max_touch']) / self.pairs[pair]['max_touch'], 3)
|
||||
|
||||
if buys is None:
|
||||
buys = ''
|
||||
@@ -855,7 +855,7 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
||||
#
|
||||
# self.calculateProbabilite2Index(dataframe, ['futur_percent_1d'], 'sma24_deriv1_1h', 'sma5_1d')
|
||||
|
||||
dataframe['ema_volume'] = 20 * (dataframe['volume'] * dataframe['hapercent']) / (
|
||||
dataframe['ema_volume'] = 20 * (dataframe['volume'] * dataframe['percent']) / (
|
||||
abs(dataframe['volume'].shift(1)) + abs(dataframe['volume'].shift(2)))
|
||||
|
||||
self.calculeDerivees(dataframe, 'ema_volume', factor_1=10, factor_2=1)
|
||||
@@ -948,7 +948,7 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
||||
& (dataframe['mid_smooth_1h_deriv1'].shift(1) <= dataframe['mid_smooth_1h_deriv1'])), dataframe['close'], np.nan)
|
||||
|
||||
dataframe['test'] = np.where(dataframe['enter_long'] == 1, dataframe['close'] * 1.01, np.nan)
|
||||
dataframe['perte_02'] = np.where((dataframe['hapercent3'] * 100 < -0.2), dataframe['close'], np.nan)
|
||||
dataframe['perte_02'] = np.where((dataframe['percent3'] * 100 < -0.2), dataframe['close'], np.nan)
|
||||
|
||||
dataframe['mid_smooth_1h_deriv2_inv'] = np.where((dataframe['mid_smooth_1h_deriv2'].shift(2) >= dataframe['mid_smooth_1h_deriv2'].shift(1))
|
||||
& (dataframe['mid_smooth_1h_deriv2'].shift(1) <= dataframe['mid_smooth_1h_deriv2']), dataframe['close'], np.nan)
|
||||
|
||||
Reference in New Issue
Block a user