Compare commits
2 Commits
a061a9d941
...
7720646267
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7720646267 | ||
|
|
682c146a66 |
17
Zeus_8_1d.py
17
Zeus_8_1d.py
@@ -403,10 +403,12 @@ class Zeus_8_1d(IStrategy):
|
||||
|
||||
pair_name = self.getShortName(pair)
|
||||
|
||||
|
||||
# if baisse > 10 and max_profit > 5 and count_of_buys == 1:
|
||||
# self.pairs[pair]['force_sell'] = False
|
||||
# return 'Bss_' + pair_name + '_' + str(count_of_buys) + '_' + str(self.pairs[pair]['has_gain']) + '_' + str(round(baisse, 2))
|
||||
|
||||
|
||||
if last_candle['mid_smooth_5_deriv1'] <= 0.1 \
|
||||
and before_last_candle['mid_smooth_5_deriv2'] > 0 \
|
||||
and last_candle['mid_smooth_5_deriv2'] < 0 \
|
||||
@@ -493,8 +495,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 +517,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 +582,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 +684,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 +1008,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 +1123,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