┏━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┓
┃ Strategy ┃ Trades ┃ Avg Profit % ┃ Tot Profit USDT ┃ Tot Profit % ┃ Avg Duration ┃ Win Draw Loss Win% ┃ Drawdown ┃ ┡━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━┩ │ Empty │ 49 │ 2.57 │ 875.875 │ 87.59 │ 13 days, 18:47:00 │ 44 0 5 89.8 │ 929.817 USDT 33.14% │ └──────────┴────────┴──────────────┴─────────────────┴──────────────┴───────────────────┴────────────────────────┴──────────────────────┘
This commit is contained in:
17
Empty.py
17
Empty.py
@@ -26,7 +26,7 @@ from random import shuffle
|
||||
timeperiods = [3, 5, 12, 24, 48, 60]
|
||||
|
||||
score_indicators = list()
|
||||
stoploss_indicators = list()
|
||||
stop_buying_indicators = list()
|
||||
god_genes_with_timeperiod = list()
|
||||
for timeperiod in timeperiods:
|
||||
# god_genes_with_timeperiod.append(f'max{timeperiod}')
|
||||
@@ -38,7 +38,7 @@ for timeperiod in timeperiods:
|
||||
god_genes_with_timeperiod.append(f"sma{timeperiod}_score")
|
||||
|
||||
# stoploss_indicators.append(f"stop_buying{timeperiod}")
|
||||
stoploss_indicators.append(f"stop_buying{timeperiod}_1d")
|
||||
stop_buying_indicators.append(f"stop_buying{timeperiod}_1d")
|
||||
|
||||
score_indicators.append(f"sma{timeperiod}_score")
|
||||
# score_indicators.append(f"sma{timeperiod}_score_1d")
|
||||
@@ -48,7 +48,7 @@ for timeperiod in timeperiods:
|
||||
# god_genes_with_timeperiod.append(f"sma{timeperiod}_trend_change_up")
|
||||
# god_genes_with_timeperiod.append(f"sma{timeperiod}_trend_change_down")
|
||||
|
||||
print(stoploss_indicators)
|
||||
print(stop_buying_indicators)
|
||||
|
||||
operators = [
|
||||
"D", # Disabled gene
|
||||
@@ -385,10 +385,12 @@ class Empty(IStrategy):
|
||||
|
||||
sell_score_indicator = CategoricalParameter(score_indicators, default="sma24_score", space='sell')
|
||||
|
||||
drop_from_last_entry = DecimalParameter(-0.1, 0, decimals=2, default=-0.025, space='protection')
|
||||
range_pos_stoploss = DecimalParameter(0, 0.1, decimals=2, default=0.05, space='protection')
|
||||
stoploss_force = DecimalParameter(-0.2, 0, decimals=2, default=-0.05, space='protection')
|
||||
stoploss_indicator = CategoricalParameter(god_genes_with_timeperiod, default="stop_buying12_1d", space='protection')
|
||||
stop_buying_indicator = CategoricalParameter(stoploss_indicators, default="stop_buying12_1d", space='protection')
|
||||
stop_buying_indicator = CategoricalParameter(stop_buying_indicators, default="stop_buying12_1d", space='protection')
|
||||
|
||||
# stoploss_timeperiod = CategoricalParameter(timeperiods, default="12", space='protection')
|
||||
|
||||
def custom_stake_amount(self, pair: str, current_time: datetime, current_rate: float,
|
||||
@@ -475,10 +477,9 @@ class Empty(IStrategy):
|
||||
if last_entry_price:
|
||||
drop_from_last_entry = (current_rate - last_entry_price) / last_entry_price
|
||||
|
||||
if drop_from_last_entry <= -0.025 and last_candle['min60'] == last_candle_3['min60'] \
|
||||
and last_candle[self.stop_buying_indicator.value] == False\
|
||||
and ((last_candle['stop_buying5_1d'] == False) or (last_candle['range_pos'] < 0)) \
|
||||
and last_candle['range_pos'] <= -0.01:
|
||||
if drop_from_last_entry <= self.drop_from_last_entry.value and last_candle['min60'] == last_candle_3['min60'] \
|
||||
and (last_candle[self.stop_buying_indicator.value] == False or (last_candle['range_pos'] < 0))\
|
||||
and last_candle['hapercent'] > 0:
|
||||
# stake_amount = trade.stake_amount
|
||||
self.pairs[trade.pair]['last_buy'] = current_rate
|
||||
print(f"adjust {current_time} {stake_amount}")
|
||||
|
||||
Reference in New Issue
Block a user