Zeus_11 optimise exit
This commit is contained in:
21
Zeus_11.py
21
Zeus_11.py
@@ -1,3 +1,5 @@
|
||||
|
||||
|
||||
# Zeus Strategy: First Generation of GodStra Strategy with maximum
|
||||
# AVG/MID profit in USDT
|
||||
# Author: @Mablue (Masoud Azizi)
|
||||
@@ -248,6 +250,9 @@ class Zeus_11(IStrategy):
|
||||
|
||||
dataframe, _ = self.dp.get_analyzed_dataframe(pair, self.timeframe)
|
||||
last_candle = dataframe.iloc[-1].squeeze()
|
||||
before_last_candle = dataframe.iloc[-2].squeeze()
|
||||
|
||||
count_of_buys = trade.nr_of_successful_entries
|
||||
|
||||
# self.analyze_conditions(pair, dataframe)
|
||||
|
||||
@@ -261,13 +266,15 @@ class Zeus_11(IStrategy):
|
||||
# if current_rate >= atr_take_profit:
|
||||
# return 'sell_atr_take_profit'
|
||||
|
||||
if (last_candle['percent3'] < -0.002) & (last_candle['percent12'] < 0) & (
|
||||
current_profit > last_candle['min_max200'] / 3):
|
||||
if (last_candle['percent3'] < 0.0) & (current_profit > last_candle['min_max200'] / 3):
|
||||
self.trades = list()
|
||||
return 'min_max200'
|
||||
return 'min_max200_' + str(count_of_buys)
|
||||
if (last_candle['percent12'] <= -0.01) & (current_profit >= expected_profit):
|
||||
self.trades = list()
|
||||
return 'profit'
|
||||
return 'profit_' + str(count_of_buys)
|
||||
if (last_candle['percent'] < 0.0) and ((last_candle['rsi'] >= 75) or before_last_candle['rsi'] >= 75):
|
||||
self.trades = list()
|
||||
return 'min_max200_' + str(count_of_buys)
|
||||
|
||||
def informative_pairs(self):
|
||||
# get access to all pairs available in whitelist.
|
||||
@@ -592,8 +599,8 @@ class Zeus_11(IStrategy):
|
||||
if (len(dataframe) < 1):
|
||||
return None
|
||||
pair = trade.pair
|
||||
if pair not in ('BTC/USDC', 'DOGE/USDC', 'ETH/USDC'):
|
||||
return None
|
||||
# if pair not in ('BTC/USDC', 'DOGE/USDC', 'ETH/USDC'):
|
||||
# return None
|
||||
max_buys = 20
|
||||
|
||||
filled_buys = trade.select_filled_orders('buy')
|
||||
@@ -607,7 +614,7 @@ class Zeus_11(IStrategy):
|
||||
# condition = False
|
||||
# self.protection_nb_buy_lost.value
|
||||
limit = last_candle['limit']
|
||||
stake_amount = min(200, self.adjust_stake_amount(pair, last_candle) * self.fibo[count_of_buys])
|
||||
stake_amount = self.config['stake_amount'] + 50 * self.fibo[count_of_buys]
|
||||
|
||||
current_time_utc = current_time.astimezone(timezone.utc)
|
||||
open_date = trade.open_date.astimezone(timezone.utc)
|
||||
|
||||
Reference in New Issue
Block a user