TEST
This commit is contained in:
15
Zeus_8_1d.py
15
Zeus_8_1d.py
@@ -493,8 +493,8 @@ class Zeus_8_1d(IStrategy):
|
||||
color_sma20 = GREEN if last_candle['sma20_deriv1'] > 0 else RED
|
||||
color_sma5 = GREEN if last_candle['mid_smooth_5_deriv1'] > 0 else RED
|
||||
color_sma5_2 = GREEN if last_candle['mid_smooth_5_deriv2'] > 0 else RED
|
||||
color_sma5_1h = GREEN if last_candle['sma60_deriv1'] > 0 else RED
|
||||
color_sma5_2h = GREEN if last_candle['sma60_deriv2'] > 0 else RED
|
||||
color_sma5_1h = GREEN if last_candle['sma5_deriv1'] > 0 else RED
|
||||
color_sma5_2h = GREEN if last_candle['sma5_deriv2'] > 0 else RED
|
||||
|
||||
last_max = int(self.pairs[pair]['last_max']) if self.pairs[pair]['last_max'] > 1 else round(self.pairs[pair]['last_max'],3)
|
||||
last_min = int(self.pairs[pair]['last_min']) if self.pairs[pair]['last_min'] > 1 else round(self.pairs[pair]['last_min'], 3)
|
||||
@@ -515,7 +515,7 @@ class Zeus_8_1d(IStrategy):
|
||||
f"{round(val, 1) or '-' :>6}|"
|
||||
f"{round(last_candle['rsi'], 0):>7}|{color_sma20}{round(last_candle['sma20_deriv1'], 2):>5}{RESET}"
|
||||
f"|{color_sma5}{round(last_candle['mid_smooth_5_deriv1'], 2):>5}{RESET}|{color_sma5_2}{round(last_candle['mid_smooth_5_deriv2'], 2):>5}{RESET}"
|
||||
f"|{color_sma5_1h}{round(last_candle['sma60_deriv1'], 2):>5}{RESET}|{color_sma5_2h}{round(last_candle['sma60_deriv2'], 2):>5}{RESET}"
|
||||
f"|{color_sma5_1h}{round(last_candle['sma5_deriv1'], 2):>5}{RESET}|{color_sma5_2h}{round(last_candle['sma5_deriv2'], 2):>5}{RESET}"
|
||||
# f"|{last_candle['min60']}|{last_candle['max60']}"
|
||||
)
|
||||
|
||||
@@ -580,10 +580,6 @@ class Zeus_8_1d(IStrategy):
|
||||
self.calculeDerivees(dataframe, 'sma10', horizon=10)
|
||||
dataframe['sma20'] = talib.SMA(dataframe, timeperiod=20)
|
||||
self.calculeDerivees(dataframe, 'sma20', horizon=20)
|
||||
dataframe['sma60'] = talib.SMA(dataframe, timeperiod=60)
|
||||
self.calculeDerivees(dataframe, 'sma60', horizon=60)
|
||||
dataframe['sma144'] = talib.SMA(dataframe, timeperiod=144)
|
||||
self.calculeDerivees(dataframe, 'sma144')
|
||||
|
||||
dataframe["percent"] = (dataframe["close"] - dataframe["open"]) / dataframe["open"]
|
||||
dataframe["percent3"] = (dataframe["close"] - dataframe["open"].shift(3)) / dataframe["open"].shift(3)
|
||||
@@ -686,6 +682,7 @@ class Zeus_8_1d(IStrategy):
|
||||
count_buys = count
|
||||
# dataframe['limit'] = dataframe['last_price'] * (1 - self.baisse[count] / 100)
|
||||
# dataframe['amount'] = amount
|
||||
self.pairs[pair]['total_amount'] = amount
|
||||
|
||||
# Compter les baisses / hausses consécutives
|
||||
self.calculateDownAndUp(dataframe, limit=0.0001)
|
||||
@@ -1009,7 +1006,7 @@ class Zeus_8_1d(IStrategy):
|
||||
|
||||
last_lost = self.getLastLost(last_candle, pair)
|
||||
|
||||
if (hours > 6 and last_candle['mid_smooth_24_deriv1'] > 0.1):
|
||||
if (False and hours > 6 and last_candle['mid_smooth_5_deriv1'] > 0 and last_candle['mid_smooth_5_deriv2'] > 0):
|
||||
try:
|
||||
stake_amount = self.pairs[pair]['first_amount'] / 4
|
||||
if self.wallets.get_available_stake_amount() > stake_amount:
|
||||
@@ -1124,7 +1121,7 @@ class Zeus_8_1d(IStrategy):
|
||||
if pair == "BTC/USDT" or pair == "BTC/USDC":
|
||||
lim = 0.005
|
||||
pct = 0.001
|
||||
pct_to_max = lim + pct * self.pairs[pair]['count_of_buys']
|
||||
pct_to_max = lim #+ pct * self.pairs[pair]['count_of_buys']
|
||||
# if self.pairs[pair]['count_of_buys'] > 6:
|
||||
# pct_to_max = 0.006 * self.pairs[pair]['count_of_buys']
|
||||
# pctClose60 = self.getPctClose60D(pair, last_candle)
|
||||
|
||||
Reference in New Issue
Block a user