Zeus_8_3_2_B_4_2 test Sell
This commit is contained in:
@@ -2,15 +2,18 @@
|
|||||||
"strategy_name": "Zeus_8_3_2_B_4_2",
|
"strategy_name": "Zeus_8_3_2_B_4_2",
|
||||||
"params": {
|
"params": {
|
||||||
"roi": {
|
"roi": {
|
||||||
"0": 10
|
"0": 0.564,
|
||||||
|
"567": 0.273,
|
||||||
|
"2814": 0.12,
|
||||||
|
"7675": 0
|
||||||
},
|
},
|
||||||
"stoploss": {
|
"stoploss": {
|
||||||
"stoploss": -1.0
|
"stoploss": -1.0
|
||||||
},
|
},
|
||||||
"trailing": {
|
"trailing": {
|
||||||
"trailing_stop": false,
|
"trailing_stop": false,
|
||||||
"trailing_stop_positive": 0.254,
|
"trailing_stop_positive": null,
|
||||||
"trailing_stop_positive_offset": 0.323,
|
"trailing_stop_positive_offset": 0.0,
|
||||||
"trailing_only_offset_is_reached": false
|
"trailing_only_offset_is_reached": false
|
||||||
},
|
},
|
||||||
"max_open_trades": {
|
"max_open_trades": {
|
||||||
@@ -18,26 +21,16 @@
|
|||||||
},
|
},
|
||||||
"buy": {
|
"buy": {
|
||||||
"indic_5m": "mid_smooth_5",
|
"indic_5m": "mid_smooth_5",
|
||||||
"indic_deriv1_5m": -1.52,
|
"mise_factor_buy": 0.01,
|
||||||
"indic_deriv2_5m": -0.15,
|
"mises": 5,
|
||||||
"mise_factor_buy": 0.1,
|
"pct": 0.02,
|
||||||
"mises": 10,
|
"pct_inc": 0.0028
|
||||||
"pct": 0.012,
|
|
||||||
"pct_inc": 0.005
|
|
||||||
},
|
},
|
||||||
"sell": {
|
"sell": {
|
||||||
"indic_5m_sell": "mid_smooth_24",
|
"indic_5m_sell": "sma24"
|
||||||
"indic_deriv1_5m_sell": -1.93,
|
|
||||||
"indic_deriv2_5m_sell": -1.4
|
|
||||||
},
|
},
|
||||||
"protection": {
|
"protection": {}
|
||||||
"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,
|
"ft_stratparam_v": 1,
|
||||||
"export_time": "2025-10-26 16:32:08.937921+00:00"
|
"export_time": "2025-10-29 20:02:20.081550+00:00"
|
||||||
}
|
}
|
||||||
@@ -252,29 +252,29 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
|||||||
|
|
||||||
indicators = {'sma5', 'sma12', 'sma24', 'sma60', 'mid_smooth_3', 'mid_smooth_5', 'mid_smooth_12', 'mid_smooth_24'}
|
indicators = {'sma5', 'sma12', 'sma24', 'sma60', 'mid_smooth_3', 'mid_smooth_5', 'mid_smooth_12', 'mid_smooth_24'}
|
||||||
|
|
||||||
mises = IntParameter(5, 50, default=10, space='buy', optimize=False, load=False)
|
mises = IntParameter(1, 50, default=10, space='buy', optimize=True, load=True)
|
||||||
|
|
||||||
pct = DecimalParameter(0.005, 0.05, default=0.012, decimals=3, space='buy', optimize=False, load=False)
|
pct = DecimalParameter(0.005, 0.05, default=0.012, decimals=3, space='buy', optimize=True, load=True)
|
||||||
pct_inc = DecimalParameter(0.0001, 0.003, default=0.005, decimals=4, space='buy', optimize=False, load=False)
|
pct_inc = DecimalParameter(0.0001, 0.003, default=0.005, decimals=4, space='buy', optimize=True, load=True)
|
||||||
|
|
||||||
indic_5m = CategoricalParameter(indicators, default="sma60", space='buy')
|
indic_5m = CategoricalParameter(indicators, default="sma60", space='buy')
|
||||||
indic_deriv1_5m = DecimalParameter(-2, 2, default=0, decimals=2, space='buy', optimize=True, load=True)
|
# indic_deriv1_5m = DecimalParameter(-2, 2, default=0, decimals=2, space='buy', optimize=True, load=True)
|
||||||
indic_deriv2_5m = DecimalParameter(-2, 2, default=0, decimals=2, space='buy', optimize=True, load=True)
|
# indic_deriv2_5m = DecimalParameter(-2, 2, default=0, decimals=2, space='buy', optimize=True, load=True)
|
||||||
|
|
||||||
# indic_1h = CategoricalParameter(indicators, default="sma60", space='buy')
|
# indic_1h = CategoricalParameter(indicators, default="sma60", space='buy')
|
||||||
# indic_deriv1_1h = DecimalParameter(-5, 5, default=0, decimals=1, space='buy', optimize=True, load=True)
|
# indic_deriv1_1h = DecimalParameter(-5, 5, default=0, decimals=1, space='buy', optimize=True, load=True)
|
||||||
# indic_deriv2_1h = DecimalParameter(-10, 10, default=0, decimals=1, space='buy', optimize=True, load=True)
|
# indic_deriv2_1h = DecimalParameter(-10, 10, default=0, decimals=1, space='buy', optimize=True, load=True)
|
||||||
|
|
||||||
indic_1d_p = CategoricalParameter(indicators, default="sma60", space='protection')
|
# indic_1d_p = CategoricalParameter(indicators, default="sma60", space='protection')
|
||||||
indic_deriv1_1d_p_stop = DecimalParameter(-2, 2, default=0, decimals=1, space='protection', optimize=True, load=True)
|
# indic_deriv1_1d_p_stop = DecimalParameter(-2, 2, default=0, decimals=1, space='protection', optimize=True, load=True)
|
||||||
indic_deriv2_1d_p_stop = DecimalParameter(-4, 4, default=0, decimals=1, space='protection', optimize=True, load=True)
|
# indic_deriv2_1d_p_stop = DecimalParameter(-4, 4, default=0, decimals=1, space='protection', optimize=True, load=True)
|
||||||
indic_deriv1_1d_p_start = DecimalParameter(-2, 2, default=0, decimals=1, space='protection', optimize=True, load=True)
|
# indic_deriv1_1d_p_start = DecimalParameter(-2, 2, default=0, decimals=1, space='protection', optimize=True, load=True)
|
||||||
indic_deriv2_1d_p_start = DecimalParameter(-4, 4, default=0, decimals=1, space='protection', optimize=True, load=True)
|
# indic_deriv2_1d_p_start = DecimalParameter(-4, 4, default=0, decimals=1, space='protection', optimize=True, load=True)
|
||||||
|
|
||||||
|
|
||||||
indic_5m_sell = CategoricalParameter(indicators, default="sma60", space='sell')
|
indic_5m_sell = CategoricalParameter(indicators, default="sma60", space='sell')
|
||||||
indic_deriv1_5m_sell = DecimalParameter(-2, 2, default=0, decimals=2, space='sell', optimize=True, load=True)
|
# indic_deriv1_5m_sell = DecimalParameter(-2, 2, default=0, decimals=2, space='sell', optimize=True, load=True)
|
||||||
indic_deriv2_5m_sell = DecimalParameter(-2, 2, default=0, decimals=2, space='sell', optimize=True, load=True)
|
# indic_deriv2_5m_sell = DecimalParameter(-2, 2, default=0, decimals=2, space='sell', optimize=True, load=True)
|
||||||
|
|
||||||
# indic_deriv1_1h_sell = DecimalParameter(-5, 5, default=0, decimals=1, space='sell', optimize=True, load=True)
|
# indic_deriv1_1h_sell = DecimalParameter(-5, 5, default=0, decimals=1, space='sell', optimize=True, load=True)
|
||||||
# indic_deriv2_1h_sell = DecimalParameter(-10, 10, default=0, decimals=1, space='sell', optimize=True, load=True)
|
# indic_deriv2_1h_sell = DecimalParameter(-10, 10, default=0, decimals=1, space='sell', optimize=True, load=True)
|
||||||
@@ -515,26 +515,26 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
|||||||
pair_name = self.getShortName(pair)
|
pair_name = self.getShortName(pair)
|
||||||
# if (current_profit > expected_profit) and last_candle['can_sell']:
|
# if (current_profit > expected_profit) and last_candle['can_sell']:
|
||||||
# return 'Can_' + pair_name + '_' + str(count_of_buys)
|
# return 'Can_' + pair_name + '_' + str(count_of_buys)
|
||||||
trend = last_candle['trend_class_1d']
|
# trend = last_candle['trend_class_1d']
|
||||||
if (trend == "BR1" or trend == "BR2") and self.pairs[pair]['has_gain'] == 0: # and (last_candle[f"{indic_5m_sell}_deriv1"] <= indic_deriv1_5m_sell and last_candle[f"{indic_5m_sell}_deriv2"] <= indic_deriv2_5m_sell):
|
# if (trend == "BR1" or trend == "BR2") and self.pairs[pair]['has_gain'] == 0: # and (last_candle[f"{indic_5m_sell}_deriv1"] <= indic_deriv1_5m_sell and last_candle[f"{indic_5m_sell}_deriv2"] <= indic_deriv2_5m_sell):
|
||||||
|
#
|
||||||
if (last_candle['max_rsi_12_1h'] > 75) and last_candle['trend_class_1h'] == 'BU1' and profit > max(5, expected_profit) and (last_candle['hapercent'] < 0):
|
# if (last_candle['max_rsi_12_1h'] > 75) and last_candle['trend_class_1h'] == 'BU1' and profit > max(5, expected_profit) and (last_candle['hapercent'] < 0):
|
||||||
self.pairs[pair]['stop'] = True
|
# self.pairs[pair]['stop'] = True
|
||||||
self.log_trade(
|
# self.log_trade(
|
||||||
last_candle=last_candle,
|
# last_candle=last_candle,
|
||||||
date=current_time,
|
# date=current_time,
|
||||||
action="🔴STOP",
|
# action="🔴STOP",
|
||||||
dispo=dispo,
|
# dispo=dispo,
|
||||||
pair=pair,
|
# pair=pair,
|
||||||
rate=last_candle['close'],
|
# rate=last_candle['close'],
|
||||||
trade_type='',
|
# trade_type='',
|
||||||
profit=self.pairs[pair]['current_profit'],
|
# profit=self.pairs[pair]['current_profit'],
|
||||||
buys=self.pairs[pair]['count_of_buys'],
|
# buys=self.pairs[pair]['count_of_buys'],
|
||||||
stake=0
|
# stake=0
|
||||||
)
|
# )
|
||||||
return "MAX_RSI"
|
# return "MAX_RSI"
|
||||||
|
#
|
||||||
return None
|
# return None
|
||||||
|
|
||||||
# if (trend == "BR1" or trend == "BR2") and last_candle[f"{self.indic_5m_sell.value}_deriv1"] <= self.indic_deriv1_5m_sell.value \
|
# if (trend == "BR1" or trend == "BR2") and last_candle[f"{self.indic_5m_sell.value}_deriv1"] <= self.indic_deriv1_5m_sell.value \
|
||||||
# and last_candle[f"{self.indic_5m_sell.value}_deriv2"] <= self.indic_deriv2_5m_sell.value:
|
# and last_candle[f"{self.indic_5m_sell.value}_deriv2"] <= self.indic_deriv2_5m_sell.value:
|
||||||
@@ -957,6 +957,8 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
|||||||
|
|
||||||
dataframe["percent"] = (dataframe["close"] - dataframe["open"]) / dataframe["open"]
|
dataframe["percent"] = (dataframe["close"] - dataframe["open"]) / dataframe["open"]
|
||||||
dataframe["percent3"] = (dataframe["close"] - dataframe["open"].shift(3)) / dataframe["open"].shift(3)
|
dataframe["percent3"] = (dataframe["close"] - dataframe["open"].shift(3)) / dataframe["open"].shift(3)
|
||||||
|
dataframe["percent12"] = (dataframe["close"] - dataframe["open"].shift(12)) / dataframe["open"].shift(12)
|
||||||
|
dataframe["percent24"] = (dataframe["close"] - dataframe["open"].shift(24)) / dataframe["open"].shift(24)
|
||||||
|
|
||||||
if self.dp.runmode.value in ('backtest'):
|
if self.dp.runmode.value in ('backtest'):
|
||||||
dataframe['futur_percent'] = 100 * (dataframe['close'].shift(-1) - dataframe['close']) / dataframe['close']
|
dataframe['futur_percent'] = 100 * (dataframe['close'].shift(-1) - dataframe['close']) / dataframe['close']
|
||||||
@@ -1229,11 +1231,11 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
|||||||
|
|
||||||
dataframe[tendency_col] = dataframe.apply(tag_by_derivatives, axis=1)
|
dataframe[tendency_col] = dataframe.apply(tag_by_derivatives, axis=1)
|
||||||
|
|
||||||
if timeframe == '1h' and verbose and self.dp.runmode.value in ('backtest'):
|
# if timeframe == '1h' and verbose and self.dp.runmode.value in ('backtest'):
|
||||||
print("##################")
|
# print("##################")
|
||||||
print(f"# STAT {timeframe} {name}{suffixe}")
|
# print(f"# STAT {timeframe} {name}{suffixe}")
|
||||||
print("##################")
|
# print("##################")
|
||||||
self.calculateProbabilite2Index(dataframe, futur_cols=['futur_percent'], indic_1=f"{name}{suffixe}_deriv1", indic_2=f"{name}{suffixe}_deriv2")
|
# self.calculateProbabilite2Index(dataframe, futur_cols=['futur_percent'], indic_1=f"{name}{suffixe}_deriv1", indic_2=f"{name}{suffixe}_deriv2")
|
||||||
|
|
||||||
return dataframe
|
return dataframe
|
||||||
|
|
||||||
@@ -1263,29 +1265,31 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
|||||||
# # & (dataframe[f"{indic_1h}_deriv2"] >= self.indic_deriv2_1h.value)
|
# # & (dataframe[f"{indic_1h}_deriv2"] >= self.indic_deriv2_1h.value)
|
||||||
# ), ['enter_long', 'enter_tag']] = (1, 'smth')
|
# ), ['enter_long', 'enter_tag']] = (1, 'smth')
|
||||||
|
|
||||||
dataframe.loc[
|
# dataframe.loc[
|
||||||
(
|
# (
|
||||||
(dataframe['sma24_deriv2'].shift(1) < 0)
|
# (dataframe['sma24_deriv2'].shift(1) < 0)
|
||||||
& (dataframe['sma24_deriv2'] > 0)
|
# & (dataframe['sma24_deriv2'] > 0)
|
||||||
& ((dataframe['max_rsi_24_1h'] < 70) | (dataframe['close'] < dataframe['close_1d']))
|
# & ((dataframe['max_rsi_24_1h'] < 70) | (dataframe['close'] < dataframe['close_1d']))
|
||||||
& (dataframe[f"{self.indic_5m.value}_deriv1"] >= self.indic_deriv1_5m.value)
|
# & (dataframe[f"{self.indic_5m.value}_deriv1"] >= self.indic_deriv1_5m.value)
|
||||||
& (dataframe[f"{self.indic_5m.value}_deriv2"] >= self.indic_deriv2_5m.value)
|
# & (dataframe[f"{self.indic_5m.value}_deriv2"] >= self.indic_deriv2_5m.value)
|
||||||
# & (dataframe[f"{indic_1h}_deriv1"] >= self.indic_deriv1_1h.value)
|
# # & (dataframe[f"{indic_1h}_deriv1"] >= self.indic_deriv1_1h.value)
|
||||||
# & (dataframe[f"{indic_1h}_deriv2"] >= self.indic_deriv2_1h.value)
|
# # & (dataframe[f"{indic_1h}_deriv2"] >= self.indic_deriv2_1h.value)
|
||||||
), ['enter_long', 'enter_tag']] = (1, 'invert')
|
# & (dataframe[f"sma60_deriv1"] >= -0.2)
|
||||||
|
# ), ['enter_long', 'enter_tag']] = (1, 'invert')
|
||||||
dataframe.loc[
|
#
|
||||||
(
|
# dataframe.loc[
|
||||||
(dataframe['sma24_deriv1'] > 0)
|
# (
|
||||||
& (dataframe['sma60_deriv1'].shift(1) < 0)
|
# (dataframe['sma24_deriv1'] > 0)
|
||||||
& (dataframe['sma60_deriv1'] > 0)
|
# & (dataframe['sma60_deriv1'].shift(1) < 0)
|
||||||
& ((dataframe['max_rsi_24_1h'] < 70) | (dataframe['close'] < dataframe['close_1d']))
|
# & (dataframe['sma60_deriv1'] > 0)
|
||||||
& (dataframe[f"{self.indic_5m.value}_deriv1"] >= self.indic_deriv1_5m.value)
|
# & ((dataframe['max_rsi_24_1h'] < 70) | (dataframe['close'] < dataframe['close_1d']))
|
||||||
& (dataframe[f"{self.indic_5m.value}_deriv2"] >= self.indic_deriv2_5m.value)
|
# & (dataframe[f"{self.indic_5m.value}_deriv1"] >= self.indic_deriv1_5m.value)
|
||||||
# & (dataframe[f"{indic_1h}_deriv1"] >= self.indic_deriv1_1h.value)
|
# & (dataframe[f"{self.indic_5m.value}_deriv2"] >= self.indic_deriv2_5m.value)
|
||||||
# & (dataframe[f"{indic_1h}_deriv2"] >= self.indic_deriv2_1h.value)
|
# # & (dataframe[f"{indic_1h}_deriv1"] >= self.indic_deriv1_1h.value)
|
||||||
), ['enter_long', 'enter_tag']] = (1, 'raise')
|
# # & (dataframe[f"{indic_1h}_deriv2"] >= self.indic_deriv2_1h.value)
|
||||||
|
# & (dataframe[f"sma60_deriv1"] >= -0.2)
|
||||||
|
# ), ['enter_long', 'enter_tag']] = (1, 'raise')
|
||||||
|
#
|
||||||
# dataframe.loc[
|
# dataframe.loc[
|
||||||
# (
|
# (
|
||||||
# (dataframe['sma60_deriv1'].shift(1) < 0)
|
# (dataframe['sma60_deriv1'].shift(1) < 0)
|
||||||
@@ -1295,18 +1299,32 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
|||||||
# & (dataframe[f"{self.indic_5m.value}_deriv2"] >= self.indic_deriv2_5m.value)
|
# & (dataframe[f"{self.indic_5m.value}_deriv2"] >= self.indic_deriv2_5m.value)
|
||||||
# # & (dataframe[f"{indic_1h}_deriv1"] >= self.indic_deriv1_1h.value)
|
# # & (dataframe[f"{indic_1h}_deriv1"] >= self.indic_deriv1_1h.value)
|
||||||
# # & (dataframe[f"{indic_1h}_deriv2"] >= self.indic_deriv2_1h.value)
|
# # & (dataframe[f"{indic_1h}_deriv2"] >= self.indic_deriv2_1h.value)
|
||||||
|
# & (dataframe[f"sma60_deriv1"] >= -0.2)
|
||||||
# ), ['enter_long', 'enter_tag']] = (1, 'stg_inv')
|
# ), ['enter_long', 'enter_tag']] = (1, 'stg_inv')
|
||||||
|
#
|
||||||
|
# dataframe.loc[
|
||||||
|
# (
|
||||||
|
# (dataframe['mid_smooth_24'].shift(24) >= dataframe['mid_smooth_24'].shift(12))
|
||||||
|
# & (dataframe['mid_smooth_24'].shift(12) <= dataframe['mid_smooth_24'])
|
||||||
|
# & ((dataframe['max_rsi_24_1h'] < 70) | (dataframe['close'] < dataframe['close_1d']))
|
||||||
|
# & (dataframe[f"{self.indic_5m.value}_deriv1"] >= self.indic_deriv1_5m.value)
|
||||||
|
# & (dataframe[f"{self.indic_5m.value}_deriv2"] >= self.indic_deriv2_5m.value)
|
||||||
|
# # & (dataframe[f"{indic_1h}_deriv1"] >= self.indic_deriv1_1h.value)
|
||||||
|
# & (dataframe[f"sma60_deriv1"] >= -0.2)
|
||||||
|
# ), ['enter_long', 'enter_tag']] = (1, 'smth3_inv')
|
||||||
|
|
||||||
dataframe.loc[
|
dataframe.loc[
|
||||||
(
|
(
|
||||||
(dataframe['mid_smooth_3_1h'].shift(24) >= dataframe['mid_smooth_3_1h'].shift(12))
|
(dataframe['percent3'] < -0.03)
|
||||||
& (dataframe['mid_smooth_3_1h'].shift(12) <= dataframe['mid_smooth_3_1h'])
|
& (dataframe['percent'] > 0)
|
||||||
& ((dataframe['max_rsi_24_1h'] < 70) | (dataframe['close'] < dataframe['close_1d']))
|
), ['enter_long', 'enter_tag']] = (1, 'pct3')
|
||||||
& (dataframe[f"{self.indic_5m.value}_deriv1"] >= self.indic_deriv1_5m.value)
|
|
||||||
& (dataframe[f"{self.indic_5m.value}_deriv2"] >= self.indic_deriv2_5m.value)
|
dataframe.loc[
|
||||||
# & (dataframe[f"{indic_1h}_deriv1"] >= self.indic_deriv1_1h.value)
|
(
|
||||||
# & (dataframe[f"{indic_1h}_deriv2"] >= self.indic_deriv2_1h.value)
|
(dataframe[f"{self.indic_5m.value}"].shift(2) >= dataframe[f"{self.indic_5m.value}"].shift(1))
|
||||||
), ['enter_long', 'enter_tag']] = (1, 'smth3_inv')
|
& (dataframe[f"{self.indic_5m.value}"].shift(1) <= dataframe['sma5'])
|
||||||
|
& (dataframe[f"sma60_deriv1"] >= -0.2)
|
||||||
|
), ['enter_long', 'enter_tag']] = (1, 'sma5')
|
||||||
|
|
||||||
dataframe['test'] = np.where(dataframe['enter_long'] == 1, dataframe['close'] * 1.01, np.nan)
|
dataframe['test'] = np.where(dataframe['enter_long'] == 1, dataframe['close'] * 1.01, np.nan)
|
||||||
|
|
||||||
@@ -1464,6 +1482,15 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
|||||||
# (dataframe['mid_smooth_deriv1'] == 0)
|
# (dataframe['mid_smooth_deriv1'] == 0)
|
||||||
# & (dataframe['mid_smooth_deriv1'].shift(1) > 0)
|
# & (dataframe['mid_smooth_deriv1'].shift(1) > 0)
|
||||||
# ), ['sell', 'exit_long']] = (1, 'sell_sma5_pct_1h')
|
# ), ['sell', 'exit_long']] = (1, 'sell_sma5_pct_1h')
|
||||||
|
|
||||||
|
# {indic_5m_sell} {indic_deriv1_5m_sell} {indic_deriv2_5m_sell}
|
||||||
|
dataframe.loc[
|
||||||
|
(
|
||||||
|
(dataframe[f"{self.indic_5m_sell.value}"].shift(2) < dataframe[f"{self.indic_5m_sell.value}"].shift(1))
|
||||||
|
& (dataframe[f"{self.indic_5m_sell.value}"].shift(1) > dataframe[f"{self.indic_5m_sell.value}"])
|
||||||
|
& (dataframe[f"sma60_deriv1"] > 0.3)
|
||||||
|
), ['exit_long', 'exit_tag']] = (1, 'sma5')
|
||||||
|
|
||||||
return dataframe
|
return dataframe
|
||||||
|
|
||||||
def adjust_trade_position(self, trade: Trade, current_time: datetime,
|
def adjust_trade_position(self, trade: Trade, current_time: datetime,
|
||||||
@@ -1562,10 +1589,8 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
|||||||
# return None
|
# return None
|
||||||
|
|
||||||
max_amount = self.config.get('stake_amount') * 2.5
|
max_amount = self.config.get('stake_amount') * 2.5
|
||||||
# stake_amount = min(stake_amount, self.wallets.get_available_stake_amount())
|
|
||||||
stake_amount = min(min(max_amount, self.wallets.get_available_stake_amount()),
|
stake_amount = min(min(max_amount, self.wallets.get_available_stake_amount()),
|
||||||
self.adjust_stake_amount(pair,
|
self.adjust_stake_amount(pair, last_candle) * abs(last_lost / self.mise_factor_buy.value))
|
||||||
last_candle) - 10 * last_lost / self.mise_factor_buy.value) # min(200, self.adjust_stake_amount(pair, last_candle) * self.fibo[count_of_buys])
|
|
||||||
|
|
||||||
if self.wallets.get_available_stake_amount() > stake_amount:
|
if self.wallets.get_available_stake_amount() > stake_amount:
|
||||||
trade_type = last_candle['enter_tag'] if last_candle['enter_long'] == 1 else 'pct48'
|
trade_type = last_candle['enter_tag'] if last_candle['enter_long'] == 1 else 'pct48'
|
||||||
@@ -1699,7 +1724,7 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
|||||||
# Calculer le minimum des 14 derniers jours
|
# Calculer le minimum des 14 derniers jours
|
||||||
nb_pairs = len(self.dp.current_whitelist())
|
nb_pairs = len(self.dp.current_whitelist())
|
||||||
|
|
||||||
base_stake_amount = self.config.get('stake_amount') #/ (self.mises.value * nb_pairs) # Montant de base configuré
|
base_stake_amount = self.config.get('stake_amount') / (self.mises.value) # * nb_pairs) # Montant de base configuré
|
||||||
# pct60 = round(100 * self.getPctClose60D(pair, last_candle), 2)
|
# pct60 = round(100 * self.getPctClose60D(pair, last_candle), 2)
|
||||||
|
|
||||||
if True: # not pair in ('BTC/USDT', 'BTC/USDC'):
|
if True: # not pair in ('BTC/USDT', 'BTC/USDC'):
|
||||||
|
|||||||
Reference in New Issue
Block a user