Zeus_8_3_2_B_4_2 current profit / down
This commit is contained in:
@@ -322,7 +322,7 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
||||
pct_first = round((last_candle['close'] - self.pairs[pair]['first_buy']) / self.pairs[pair]['first_buy'], 3)
|
||||
|
||||
# if (last_candle['rsi_1d'] > 50) & (last_candle['percent12'] < 0.0):
|
||||
if (last_candle['percent3'] < 0.0) & (current_profit > last_candle['min_max200'] / 3):
|
||||
if (last_candle['percent3'] < 0.0) & (current_profit > 0.05): #last_candle['min_max200'] / 3):
|
||||
self.trades = list()
|
||||
return 'mx_' + str(count_of_buys)
|
||||
if (last_candle['percent12'] <= -0.01) & (current_profit >= expected_profit):
|
||||
@@ -491,7 +491,7 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
||||
dataframe['highest_4_average'] = highest_4.mean()
|
||||
|
||||
# Compter les baisses consécutives
|
||||
dataframe['down'] = dataframe['hapercent'] <= 0.001
|
||||
dataframe['down'] = dataframe['hapercent'] <= 0.0001
|
||||
dataframe['up'] = dataframe['hapercent'] >= 0.0001
|
||||
dataframe['down_count'] = - dataframe['down'].astype(int) * (
|
||||
dataframe['down'].groupby((dataframe['down'] != dataframe['down'].shift()).cumsum()).cumcount() + 1)
|
||||
@@ -688,7 +688,7 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
||||
|
||||
dataframe.loc[
|
||||
(
|
||||
(dataframe['max200_diff'] >= 0.025)
|
||||
(dataframe['max200_diff'] >= 0.01)
|
||||
& (dataframe['percent12'] < -0.002)
|
||||
# & (dataframe['pct_change'] < 0)
|
||||
& (dataframe['open'] < dataframe['average_line_288_099'])
|
||||
@@ -706,7 +706,6 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
||||
(dataframe['percent24'] < -0.022) |
|
||||
(dataframe['percent48'] < -0.030)
|
||||
)
|
||||
& (dataframe['count_buys'] == 0)
|
||||
& (dataframe['close'] <= dataframe['min50'] * 1.002)
|
||||
& (dataframe['open'] < dataframe['average_line_50'])
|
||||
& (
|
||||
@@ -739,9 +738,6 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
||||
& (dataframe['pct_change'] < 0)
|
||||
& (dataframe['min200'].shift(2) == dataframe['min200'])
|
||||
& (dataframe['close'] < dataframe['lowest_4_average'])
|
||||
& (dataframe['count_buys'] == 0 |
|
||||
((dataframe['count_buys'] > 0) & (dataframe['close'] <= dataframe['limit']))
|
||||
)
|
||||
& (dataframe['up_count'] > 0)
|
||||
), ['enter_long', 'enter_tag']] = (1, 'min200')
|
||||
|
||||
@@ -749,10 +745,10 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
||||
(
|
||||
# (dataframe['rsi_1h'] < 70)
|
||||
# & (dataframe['rsi_diff_1h'] > -5)
|
||||
(dataframe["bb_width"] > 0.01)
|
||||
& (dataframe['down_count'].shift(1) < - 6)
|
||||
# (dataframe["bb_width"] > 0.01)
|
||||
(dataframe['down_count'].shift(1) < - 6)
|
||||
& (dataframe['down_count'] == 0)
|
||||
& (dataframe['down_pct'].shift(1) <= -0.5)
|
||||
# & (dataframe['down_pct'].shift(1) <= -0.5)
|
||||
), ['enter_long', 'enter_tag']] = (1, 'down')
|
||||
|
||||
dataframe['test'] = np.where(dataframe['enter_long'] == 1, dataframe['close'] * 1.01, np.nan)
|
||||
|
||||
Reference in New Issue
Block a user