┏━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┓
┃ Strategy ┃ Trades ┃ Avg Profit % ┃ Tot Profit USDT ┃ Tot Profit % ┃ Avg Duration ┃ Win Draw Loss Win% ┃ Drawdown ┃ ┡━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━┩ │ Empty │ 108 │ 2.03 │ 5660.765 │ 566.08 │ 4 days, 9:45:00 │ 62 0 46 57.4 │ 757.488 USDT 17.40% │ └──────────┴────────┴──────────────┴─────────────────┴──────────────┴─────────────────┴────────────────────────┴──────────────────────┘
This commit is contained in:
34
Empty.py
34
Empty.py
@@ -364,13 +364,14 @@ class Empty(IStrategy):
|
||||
last_candle_2 = dataframe.iloc[-2].squeeze()
|
||||
last_candle_3 = dataframe.iloc[-3].squeeze()
|
||||
|
||||
# if (last_candle['has_cross_min_6'] and last_candle['sma60_deriv1'] > 0) or (last_candle['sma12_inv_1d']):
|
||||
# self.pairs[pair]['count_of_lost'] = 0
|
||||
|
||||
condition = False if self.pairs[pair]['count_of_lost'] >= 1 \
|
||||
and (last_candle['sma12_deriv1_1d'] < 0.001 \
|
||||
or last_candle['sma12_deriv2_1d'] < 0.001) and entry_tag != 'dist' else True
|
||||
|
||||
if entry_tag == 'Force':
|
||||
if self.pairs[pair]['count_of_lost'] >= 1:
|
||||
self.pairs[pair]['count_of_lost'] = 0
|
||||
condition = False
|
||||
else:
|
||||
condition = False if self.pairs[pair]['count_of_lost'] >= 1 \
|
||||
and (last_candle['sma12_deriv1_1d'] < 0.001 or last_candle['sma12_deriv2_1d'] < 0.001) \
|
||||
and entry_tag != 'dist' else True
|
||||
reason = ''
|
||||
if not condition:
|
||||
reason = 'lost'
|
||||
@@ -858,16 +859,31 @@ class Empty(IStrategy):
|
||||
# ['enter_long', 'enter_tag']
|
||||
# ] = (1, 'cross_min')
|
||||
|
||||
# conditions = list()
|
||||
conditions = list()
|
||||
conditions.append(dataframe['sma12_deriv1'] > 0.00)
|
||||
conditions.append(dataframe['sma60_deriv1'] > 0.0)
|
||||
conditions.append(dataframe['sma5_deriv1_1d'] > 0.0)
|
||||
conditions.append(dataframe['sma12_deriv1_1d'] > 0.0)
|
||||
conditions.append(dataframe['sma24_deriv1_1d'] > 0.0)
|
||||
conditions.append(dataframe['sma100_deriv1_1d'] > 0.0)
|
||||
# conditions.append(dataframe['sma12_deriv1_1d'] > 0.0)
|
||||
# # conditions.append(dataframe['close_1d'] < dataframe[f'sma{self.buy_longue.value}_1d'])
|
||||
# # conditions.append(dataframe['has_cross_min'].rolling(6).max() == 1)
|
||||
# # conditions.append(dataframe['mid_smooth5'] > dataframe['mid_smooth5'].shift(1))
|
||||
# conditions.append(dataframe['min12'] == dataframe['min12'].shift(3))
|
||||
# conditions.append((dataframe['percent24'] < -0.025) | (dataframe['percent12'] < -0.025))
|
||||
dataframe.loc[
|
||||
reduce(lambda x, y: x & y, conditions),
|
||||
['enter_long', 'enter_tag']
|
||||
] = (1, 'Rise')
|
||||
|
||||
# conditions = list()
|
||||
# conditions.append(dataframe['has_cross_min_6'] == True)
|
||||
# conditions.append(dataframe['min36'] == dataframe['min36'].shift(3))
|
||||
# dataframe.loc[
|
||||
# reduce(lambda x, y: x & y, conditions),
|
||||
# ['enter_long', 'enter_tag']
|
||||
# ] = (1, 'fall')
|
||||
# ] = (1, 'Force')
|
||||
|
||||
return dataframe
|
||||
|
||||
|
||||
Reference in New Issue
Block a user