From 39dd2b0ffcb9a7e929b28e6f09865fcc9a8c0de6 Mon Sep 17 00:00:00 2001 From: iterativ Date: Tue, 27 Jul 2021 14:41:28 +0300 Subject: [PATCH 01/33] Buy 1: CTI check, plus more strict --- NostalgiaForInfinityNext.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index ff87e8055d..4ba1005e27 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -1766,10 +1766,11 @@ class NostalgiaForInfinityNext(IStrategy): buy_dump_protection_60_5 = DecimalParameter(0.3, 0.8, default=0.74, space='buy', decimals=2, optimize=False, load=True) buy_min_inc_1 = DecimalParameter(0.01, 0.05, default=0.022, space='buy', decimals=3, optimize=False, load=True) - buy_rsi_1h_min_1 = DecimalParameter(25.0, 40.0, default=30.0, space='buy', decimals=1, optimize=False, load=True) + buy_rsi_1h_min_1 = DecimalParameter(25.0, 40.0, default=20.0, space='buy', decimals=1, optimize=False, load=True) buy_rsi_1h_max_1 = DecimalParameter(70.0, 90.0, default=84.0, space='buy', decimals=1, optimize=False, load=True) buy_rsi_1 = DecimalParameter(20.0, 40.0, default=36.0, space='buy', decimals=1, optimize=False, load=True) - buy_mfi_1 = DecimalParameter(20.0, 40.0, default=44.0, space='buy', decimals=1, optimize=False, load=True) + buy_mfi_1 = DecimalParameter(20.0, 40.0, default=50.0, space='buy', decimals=1, optimize=False, load=True) + buy_cti_1 = DecimalParameter(-0.99, -0.5, default=-0.88, space='buy', decimals=2, optimize=False, load=True) buy_rsi_1h_min_2 = DecimalParameter(30.0, 40.0, default=32.0, space='buy', decimals=1, optimize=False, load=True) buy_rsi_1h_max_2 = DecimalParameter(70.0, 95.0, default=84.0, space='buy', decimals=1, optimize=False, load=True) @@ -3211,10 +3212,12 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: item_buy_logic = [] item_buy_logic.append(reduce(lambda x, y: x & y, buy_protection_list[0])) item_buy_logic.append(((dataframe['close'] - dataframe['open'].rolling(36).min()) / dataframe['open'].rolling(36).min()) > self.buy_min_inc_1.value) + item_buy_logic.append(((dataframe['close'] - dataframe['open'].rolling(36).min()) / dataframe['open'].rolling(36).min()) > self.buy_min_inc_1.value) item_buy_logic.append(dataframe['rsi_1h'] > self.buy_rsi_1h_min_1.value) item_buy_logic.append(dataframe['rsi_1h'] < self.buy_rsi_1h_max_1.value) item_buy_logic.append(dataframe['rsi'] < self.buy_rsi_1.value) item_buy_logic.append(dataframe['mfi'] < self.buy_mfi_1.value) + item_buy_logic.append(dataframe['cti'] < self.buy_cti_1.value) item_buy_logic.append(dataframe['volume'] > 0) item_buy = reduce(lambda x, y: x & y, item_buy_logic) dataframe.loc[ From 72ba9a4476413379ee00477bd695dd31293798ed Mon Sep 17 00:00:00 2001 From: iterativ Date: Tue, 27 Jul 2021 16:17:43 +0300 Subject: [PATCH 02/33] Buy 2: more strict. Volume check. --- NostalgiaForInfinityNext.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index 4ba1005e27..de80ad1763 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -212,7 +212,7 @@ class NostalgiaForInfinityNext(IStrategy): "sma200_1h_rising_val" : CategoricalParameter(["20","30","36","44","50"], default="50", space='buy', optimize=False, load=True), "safe_dips" : CategoricalParameter([True, False], default=True, space='buy', optimize=False, load=True), "safe_dips_type" : CategoricalParameter(["10","50","100"], default="50", space='buy', optimize=False, load=True), - "safe_pump" : CategoricalParameter([True, False], default=True, space='buy', optimize=False, load=True), + "safe_pump" : CategoricalParameter([True, False], default=False, space='buy', optimize=False, load=True), "safe_pump_type" : CategoricalParameter(["10","50","100"], default="50", space='buy', optimize=False, load=True), "safe_pump_period" : CategoricalParameter(["24","36","48"], default="24", space='buy', optimize=False, load=True), "btc_1h_not_downtrend" : CategoricalParameter([True, False], default=False, space='buy', optimize=False, load=True) @@ -1774,9 +1774,10 @@ class NostalgiaForInfinityNext(IStrategy): buy_rsi_1h_min_2 = DecimalParameter(30.0, 40.0, default=32.0, space='buy', decimals=1, optimize=False, load=True) buy_rsi_1h_max_2 = DecimalParameter(70.0, 95.0, default=84.0, space='buy', decimals=1, optimize=False, load=True) - buy_rsi_1h_diff_2 = DecimalParameter(30.0, 50.0, default=39.0, space='buy', decimals=1, optimize=False, load=True) + buy_rsi_1h_diff_2 = DecimalParameter(30.0, 50.0, default=38.0, space='buy', decimals=1, optimize=False, load=True) buy_mfi_2 = DecimalParameter(30.0, 56.0, default=49.0, space='buy', decimals=1, optimize=False, load=True) buy_bb_offset_2 = DecimalParameter(0.97, 0.999, default=0.983, space='buy', decimals=3, optimize=False, load=True) + buy_volume_2 = DecimalParameter(0.6, 6.0, default=1.6, space='buy', decimals=1, optimize=False, load=True) buy_bb40_bbdelta_close_3 = DecimalParameter(0.005, 0.06, default=0.059, space='buy', optimize=False, load=True) buy_bb40_closedelta_close_3 = DecimalParameter(0.01, 0.03, default=0.023, space='buy', optimize=False, load=True) @@ -3241,6 +3242,7 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: item_buy_logic.append(dataframe['rsi'] < dataframe['rsi_1h'] - self.buy_rsi_1h_diff_2.value) item_buy_logic.append(dataframe['mfi'] < self.buy_mfi_2.value) item_buy_logic.append(dataframe['close'] < (dataframe['bb20_2_low'] * self.buy_bb_offset_2.value)) + item_buy_logic.append(dataframe['volume'] < (dataframe['volume_mean_4'] * self.buy_volume_2.value)) item_buy_logic.append(dataframe['volume'] > 0) item_buy = reduce(lambda x, y: x & y, item_buy_logic) dataframe.loc[ From 54bebc48a5b1c895236a355f7480659b1d9a706d Mon Sep 17 00:00:00 2001 From: iterativ Date: Tue, 27 Jul 2021 19:22:39 +0300 Subject: [PATCH 03/33] Buy 3: more strict. --- NostalgiaForInfinityNext.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index de80ad1763..6ce5dbf018 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -231,8 +231,8 @@ class NostalgiaForInfinityNext(IStrategy): "sma200_rising_val" : CategoricalParameter(["20","30","36","44","50"], default="50", space='buy', optimize=False, load=True), "sma200_1h_rising" : CategoricalParameter([True, False], default=False, space='buy', optimize=False, load=True), "sma200_1h_rising_val" : CategoricalParameter(["20","30","36","44","50"], default="50", space='buy', optimize=False, load=True), - "safe_dips" : CategoricalParameter([True, False], default=False, space='buy', optimize=False, load=True), - "safe_dips_type" : CategoricalParameter(["10","50","100"], default="10", space='buy', optimize=False, load=True), + "safe_dips" : CategoricalParameter([True, False], default=True, space='buy', optimize=False, load=True), + "safe_dips_type" : CategoricalParameter(["10","50","100"], default="80", space='buy', optimize=False, load=True), "safe_pump" : CategoricalParameter([True, False], default=True, space='buy', optimize=False, load=True), "safe_pump_type" : CategoricalParameter(["10","50","100"], default="100", space='buy', optimize=False, load=True), "safe_pump_period" : CategoricalParameter(["24","36","48"], default="36", space='buy', optimize=False, load=True), @@ -1779,10 +1779,11 @@ class NostalgiaForInfinityNext(IStrategy): buy_bb_offset_2 = DecimalParameter(0.97, 0.999, default=0.983, space='buy', decimals=3, optimize=False, load=True) buy_volume_2 = DecimalParameter(0.6, 6.0, default=1.6, space='buy', decimals=1, optimize=False, load=True) - buy_bb40_bbdelta_close_3 = DecimalParameter(0.005, 0.06, default=0.059, space='buy', optimize=False, load=True) - buy_bb40_closedelta_close_3 = DecimalParameter(0.01, 0.03, default=0.023, space='buy', optimize=False, load=True) + buy_bb40_bbdelta_close_3 = DecimalParameter(0.005, 0.06, default=0.045, space='buy', optimize=False, load=True) + buy_bb40_closedelta_close_3 = DecimalParameter(0.01, 0.03, default=0.022, space='buy', optimize=False, load=True) buy_bb40_tail_bbdelta_3 = DecimalParameter(0.15, 0.45, default=0.418, space='buy', optimize=False, load=True) buy_ema_rel_3 = DecimalParameter(0.97, 0.999, default=0.986, space='buy', decimals=3, optimize=False, load=True) + buy_cti_3 = DecimalParameter(-0.99, -0.5, default=-0.9, space='buy', decimals=2, optimize=False, load=True) buy_bb20_close_bblowerband_4 = DecimalParameter(0.96, 0.99, default=0.98, space='buy', optimize=False, load=True) buy_bb20_volume_4 = DecimalParameter(1.0, 20.0, default=10.0, space='buy', decimals=2, optimize=False, load=True) @@ -3270,6 +3271,7 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: item_buy_logic.append(dataframe['tail'].lt(dataframe['bb40_2_delta'] * self.buy_bb40_tail_bbdelta_3.value)) item_buy_logic.append(dataframe['close'].lt(dataframe['bb40_2_low'].shift())) item_buy_logic.append(dataframe['close'].le(dataframe['close'].shift())) + item_buy_logic.append(dataframe['cti'] < self.buy_cti_3.value) item_buy_logic.append(dataframe['volume'] > 0) item_buy = reduce(lambda x, y: x & y, item_buy_logic) dataframe.loc[ From 960ea43da6c9012e194ed0a7273cb8973c41809b Mon Sep 17 00:00:00 2001 From: iterativ Date: Tue, 27 Jul 2021 21:52:17 +0300 Subject: [PATCH 04/33] Buy 4: more strict. --- NostalgiaForInfinityNext.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index 6ce5dbf018..96ba6252ef 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -240,7 +240,7 @@ class NostalgiaForInfinityNext(IStrategy): }, 4: { "enable" : CategoricalParameter([True, False], default=True, space='buy', optimize=False, load=True), - "ema_fast" : CategoricalParameter([True, False], default=False, space='buy', optimize=False, load=True), + "ema_fast" : CategoricalParameter([True, False], default=True, space='buy', optimize=False, load=True), "ema_fast_len" : CategoricalParameter(["26","50","100","200"], default="50", space='buy', optimize=False, load=True), "ema_slow" : CategoricalParameter([True, False], default=True, space='buy', optimize=False, load=True), "ema_slow_len" : CategoricalParameter(["26","50","100","200"], default="50", space='buy', optimize=False, load=True), @@ -248,13 +248,13 @@ class NostalgiaForInfinityNext(IStrategy): "close_above_ema_fast_len" : CategoricalParameter(["12","20","26","50","100","200"], default="200", space='buy', optimize=False, load=True), "close_above_ema_slow" : CategoricalParameter([True, False], default=False, space='buy', optimize=False, load=True), "close_above_ema_slow_len" : CategoricalParameter(["15","50","200"], default="200", space='buy', optimize=False, load=True), - "sma200_rising" : CategoricalParameter([True, False], default=True, space='buy', optimize=False, load=True), + "sma200_rising" : CategoricalParameter([True, False], default=False, space='buy', optimize=False, load=True), "sma200_rising_val" : CategoricalParameter(["20","30","36","44","50"], default="50", space='buy', optimize=False, load=True), "sma200_1h_rising" : CategoricalParameter([True, False], default=False, space='buy', optimize=False, load=True), "sma200_1h_rising_val" : CategoricalParameter(["20","30","36","44","50"], default="20", space='buy', optimize=False, load=True), "safe_dips" : CategoricalParameter([True, False], default=True, space='buy', optimize=False, load=True), - "safe_dips_type" : CategoricalParameter(["10","50","100"], default="10", space='buy', optimize=False, load=True), - "safe_pump" : CategoricalParameter([True, False], default=True, space='buy', optimize=False, load=True), + "safe_dips_type" : CategoricalParameter(["10","50","100"], default="50", space='buy', optimize=False, load=True), + "safe_pump" : CategoricalParameter([True, False], default=False, space='buy', optimize=False, load=True), "safe_pump_type" : CategoricalParameter(["10","50","100"], default="110", space='buy', optimize=False, load=True), "safe_pump_period" : CategoricalParameter(["24","36","48"], default="48", space='buy', optimize=False, load=True), "btc_1h_not_downtrend" : CategoricalParameter([True, False], default=False, space='buy', optimize=False, load=True) @@ -1785,8 +1785,8 @@ class NostalgiaForInfinityNext(IStrategy): buy_ema_rel_3 = DecimalParameter(0.97, 0.999, default=0.986, space='buy', decimals=3, optimize=False, load=True) buy_cti_3 = DecimalParameter(-0.99, -0.5, default=-0.9, space='buy', decimals=2, optimize=False, load=True) - buy_bb20_close_bblowerband_4 = DecimalParameter(0.96, 0.99, default=0.98, space='buy', optimize=False, load=True) - buy_bb20_volume_4 = DecimalParameter(1.0, 20.0, default=10.0, space='buy', decimals=2, optimize=False, load=True) + buy_bb20_close_bblowerband_4 = DecimalParameter(0.96, 0.99, default=0.976, space='buy', optimize=False, load=True) + buy_bb20_volume_4 = DecimalParameter(1.0, 20.0, default=3.0, space='buy', decimals=2, optimize=False, load=True) buy_ema_open_mult_5 = DecimalParameter(0.016, 0.03, default=0.018, space='buy', decimals=3, optimize=False, load=True) buy_bb_offset_5 = DecimalParameter(0.98, 1.0, default=0.996, space='buy', decimals=3, optimize=False, load=True) From 90af69d0f9c0d4d9340f1da04985a6724be1d272 Mon Sep 17 00:00:00 2001 From: iterativ Date: Wed, 28 Jul 2021 00:47:49 +0300 Subject: [PATCH 05/33] Dip protections level 120 & 130. --- NostalgiaForInfinityNext.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index 96ba6252ef..b1cab3a6e9 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -1626,6 +1626,16 @@ class NostalgiaForInfinityNext(IStrategy): buy_dip_threshold_110_2 = DecimalParameter(0.16, 0.3, default=0.26, space='buy', decimals=3, optimize=False, load=True) buy_dip_threshold_110_3 = DecimalParameter(0.3, 0.5, default=0.44, space='buy', decimals=3, optimize=False, load=True) buy_dip_threshold_110_4 = DecimalParameter(0.6, 1.0, default=0.84, space='buy', decimals=3, optimize=False, load=True) + # Loose dips - level 120 + buy_dip_threshold_120_1 = DecimalParameter(0.001, 0.05, default=0.028, space='buy', decimals=3, optimize=False, load=True) + buy_dip_threshold_120_2 = DecimalParameter(0.16, 0.3, default=0.28, space='buy', decimals=3, optimize=False, load=True) + buy_dip_threshold_120_3 = DecimalParameter(0.3, 0.5, default=0.46, space='buy', decimals=3, optimize=False, load=True) + buy_dip_threshold_120_4 = DecimalParameter(0.6, 1.0, default=0.86, space='buy', decimals=3, optimize=False, load=True) + # Loose dips - level 130 + buy_dip_threshold_130_1 = DecimalParameter(0.001, 0.05, default=0.028, space='buy', decimals=3, optimize=False, load=True) + buy_dip_threshold_130_2 = DecimalParameter(0.16, 0.34, default=0.3, space='buy', decimals=3, optimize=False, load=True) + buy_dip_threshold_130_3 = DecimalParameter(0.36, 0.56, default=0.48, space='buy', decimals=3, optimize=False, load=True) + buy_dip_threshold_130_4 = DecimalParameter(0.6, 1.0, default=0.9, space='buy', decimals=3, optimize=False, load=True) # 24 hours - level 10 buy_pump_pull_threshold_10_24 = DecimalParameter(1.5, 3.0, default=2.2, space='buy', decimals=2, optimize=False, load=True) @@ -3077,6 +3087,8 @@ def normal_tf_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFram dataframe['safe_dips_90'] = self.safe_dips(dataframe, self.buy_dip_threshold_90_1.value, self.buy_dip_threshold_90_2.value, self.buy_dip_threshold_90_3.value, self.buy_dip_threshold_90_4.value) dataframe['safe_dips_100'] = self.safe_dips(dataframe, self.buy_dip_threshold_100_1.value, self.buy_dip_threshold_100_2.value, self.buy_dip_threshold_100_3.value, self.buy_dip_threshold_100_4.value) dataframe['safe_dips_110'] = self.safe_dips(dataframe, self.buy_dip_threshold_110_1.value, self.buy_dip_threshold_110_2.value, self.buy_dip_threshold_110_3.value, self.buy_dip_threshold_110_4.value) + dataframe['safe_dips_120'] = self.safe_dips(dataframe, self.buy_dip_threshold_120_1.value, self.buy_dip_threshold_120_2.value, self.buy_dip_threshold_120_3.value, self.buy_dip_threshold_120_4.value) + dataframe['safe_dips_130'] = self.safe_dips(dataframe, self.buy_dip_threshold_130_1.value, self.buy_dip_threshold_130_2.value, self.buy_dip_threshold_130_3.value, self.buy_dip_threshold_130_4.value) # Volume dataframe['volume_mean_4'] = dataframe['volume'].rolling(4).mean().shift(1) From 282ef862e0ebbb3a30698a03645b5a214f5199e9 Mon Sep 17 00:00:00 2001 From: iterativ Date: Wed, 28 Jul 2021 01:01:20 +0300 Subject: [PATCH 06/33] Buy 5: more strict. --- NostalgiaForInfinityNext.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index b1cab3a6e9..e29eb8ed15 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -274,9 +274,9 @@ class NostalgiaForInfinityNext(IStrategy): "sma200_1h_rising" : CategoricalParameter([True, False], default=False, space='buy', optimize=False, load=True), "sma200_1h_rising_val" : CategoricalParameter(["20","30","36","44","50"], default="50", space='buy', optimize=False, load=True), "safe_dips" : CategoricalParameter([True, False], default=True, space='buy', optimize=False, load=True), - "safe_dips_type" : CategoricalParameter(["10","50","100"], default="100", space='buy', optimize=False, load=True), + "safe_dips_type" : CategoricalParameter(["10","50","100"], default="130", space='buy', optimize=False, load=True), "safe_pump" : CategoricalParameter([True, False], default=True, space='buy', optimize=False, load=True), - "safe_pump_type" : CategoricalParameter(["10","50","100"], default="20", space='buy', optimize=False, load=True), + "safe_pump_type" : CategoricalParameter(["10","50","100"], default="30", space='buy', optimize=False, load=True), "safe_pump_period" : CategoricalParameter(["24","36","48"], default="36", space='buy', optimize=False, load=True), "btc_1h_not_downtrend" : CategoricalParameter([True, False], default=False, space='buy', optimize=False, load=True) }, @@ -1801,6 +1801,8 @@ class NostalgiaForInfinityNext(IStrategy): buy_ema_open_mult_5 = DecimalParameter(0.016, 0.03, default=0.018, space='buy', decimals=3, optimize=False, load=True) buy_bb_offset_5 = DecimalParameter(0.98, 1.0, default=0.996, space='buy', decimals=3, optimize=False, load=True) buy_ema_rel_5 = DecimalParameter(0.97, 0.999, default=0.944, space='buy', decimals=3, optimize=False, load=True) + buy_cti_5 = DecimalParameter(-0.99, -0.5, default=-0.84, space='buy', decimals=2, optimize=False, load=True) + buy_volume_5 = DecimalParameter(0.6, 6.0, default=1.9, space='buy', decimals=1, optimize=False, load=True) buy_ema_open_mult_6 = DecimalParameter(0.02, 0.03, default=0.021, space='buy', decimals=3, optimize=False, load=True) buy_bb_offset_6 = DecimalParameter(0.98, 0.999, default=0.984, space='buy', decimals=3, optimize=False, load=True) @@ -3332,6 +3334,8 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: item_buy_logic.append((dataframe['ema_26'] - dataframe['ema_12']) > (dataframe['open'] * self.buy_ema_open_mult_5.value)) item_buy_logic.append((dataframe['ema_26'].shift() - dataframe['ema_12'].shift()) > (dataframe['open'] / 100)) item_buy_logic.append(dataframe['close'] < (dataframe['bb20_2_low'] * self.buy_bb_offset_5.value)) + item_buy_logic.append(dataframe['cti'] < self.buy_cti_5.value) + item_buy_logic.append(dataframe['volume'] < (dataframe['volume_mean_4'] * self.buy_volume_5.value)) item_buy_logic.append(dataframe['volume'] > 0) item_buy = reduce(lambda x, y: x & y, item_buy_logic) dataframe.loc[ From 025bf178e7a0b2617161272dd1b46f278d9d98ff Mon Sep 17 00:00:00 2001 From: iterativ Date: Wed, 28 Jul 2021 11:46:51 +0300 Subject: [PATCH 07/33] Buy 7: rework, more strict. --- NostalgiaForInfinityNext.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index e29eb8ed15..6f1c7b9ab9 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -1807,8 +1807,8 @@ class NostalgiaForInfinityNext(IStrategy): buy_ema_open_mult_6 = DecimalParameter(0.02, 0.03, default=0.021, space='buy', decimals=3, optimize=False, load=True) buy_bb_offset_6 = DecimalParameter(0.98, 0.999, default=0.984, space='buy', decimals=3, optimize=False, load=True) - buy_ema_open_mult_7 = DecimalParameter(0.02, 0.04, default=0.03, space='buy', decimals=3, optimize=False, load=True) - buy_rsi_7 = DecimalParameter(24.0, 50.0, default=37.0, space='buy', decimals=1, optimize=False, load=True) + buy_ema_open_mult_7 = DecimalParameter(0.02, 0.04, default=0.031, space='buy', decimals=3, optimize=False, load=True) + buy_cti_7 = DecimalParameter(-0.99, -0.5, default=-0.89, space='buy', decimals=2, optimize=False, load=True) buy_cti_8 = DecimalParameter(-0.99, -0.5, default=-0.9, space='buy', decimals=2, optimize=False, load=True) buy_rsi_8 = DecimalParameter(20.0, 50.0, default=30.0, space='buy', decimals=1, optimize=False, load=True) @@ -3383,8 +3383,7 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: item_buy_logic.append(dataframe['ema_26'] > dataframe['ema_12']) item_buy_logic.append((dataframe['ema_26'] - dataframe['ema_12']) > (dataframe['open'] * self.buy_ema_open_mult_7.value)) item_buy_logic.append((dataframe['ema_26'].shift() - dataframe['ema_12'].shift()) > (dataframe['open'] / 100)) - item_buy_logic.append(dataframe['rsi'] < self.buy_rsi_7.value) - item_buy_logic.append(dataframe['cti'] < -0.7) + item_buy_logic.append(dataframe['cti'] < self.buy_cti_7.value) item_buy_logic.append(dataframe['volume'] > 0) item_buy = reduce(lambda x, y: x & y, item_buy_logic) dataframe.loc[ From 8d251697ca5941a4d3815bcaf56d6f4157c56225 Mon Sep 17 00:00:00 2001 From: iterativ Date: Wed, 28 Jul 2021 15:31:49 +0300 Subject: [PATCH 08/33] Buy 8: rework. --- NostalgiaForInfinityNext.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index 6f1c7b9ab9..d15bdc97e4 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -336,7 +336,7 @@ class NostalgiaForInfinityNext(IStrategy): "sma200_rising_val" : CategoricalParameter(["20","30","36","44","50"], default="50", space='buy', optimize=False, load=True), "sma200_1h_rising" : CategoricalParameter([True, False], default=False, space='buy', optimize=False, load=True), "sma200_1h_rising_val" : CategoricalParameter(["20","30","36","44","50"], default="50", space='buy', optimize=False, load=True), - "safe_dips" : CategoricalParameter([True, False], default=False, space='buy', optimize=False, load=True), + "safe_dips" : CategoricalParameter([True, False], default=True, space='buy', optimize=False, load=True), "safe_dips_type" : CategoricalParameter(["10","50","100"], default="100", space='buy', optimize=False, load=True), "safe_pump" : CategoricalParameter([True, False], default=True, space='buy', optimize=False, load=True), "safe_pump_type" : CategoricalParameter(["10","50","100"], default="120", space='buy', optimize=False, load=True), @@ -1810,10 +1810,11 @@ class NostalgiaForInfinityNext(IStrategy): buy_ema_open_mult_7 = DecimalParameter(0.02, 0.04, default=0.031, space='buy', decimals=3, optimize=False, load=True) buy_cti_7 = DecimalParameter(-0.99, -0.5, default=-0.89, space='buy', decimals=2, optimize=False, load=True) - buy_cti_8 = DecimalParameter(-0.99, -0.5, default=-0.9, space='buy', decimals=2, optimize=False, load=True) - buy_rsi_8 = DecimalParameter(20.0, 50.0, default=30.0, space='buy', decimals=1, optimize=False, load=True) + buy_cti_8 = DecimalParameter(-0.99, -0.5, default=-0.77, space='buy', decimals=2, optimize=False, load=True) + buy_rsi_8 = DecimalParameter(20.0, 50.0, default=40.0, space='buy', decimals=1, optimize=False, load=True) + buy_bb_offset_8 = DecimalParameter(0.98, 1.0, default=0.986, space='buy', decimals=3, optimize=False, load=True) buy_rsi_1h_8 = DecimalParameter(40.0, 66.0, default=54.0, space='buy', decimals=1, optimize=False, load=True) - buy_volume_8 = DecimalParameter(0.6, 6.0, default=1.2, space='buy', decimals=1, optimize=False, load=True) + buy_volume_8 = DecimalParameter(0.6, 6.0, default=1.8, space='buy', decimals=1, optimize=False, load=True) buy_ma_offset_9 = DecimalParameter(0.91, 0.94, default=0.922, space='buy', decimals=3, optimize=False, load=True) buy_bb_offset_9 = DecimalParameter(0.96, 0.98, default=0.942, space='buy', decimals=3, optimize=False, load=True) @@ -3404,11 +3405,9 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: # Logic item_buy_logic = [] item_buy_logic.append(reduce(lambda x, y: x & y, buy_protection_list[7])) - item_buy_logic.append(dataframe['moderi_32']) - item_buy_logic.append(dataframe['moderi_64']) item_buy_logic.append(dataframe['moderi_96']) item_buy_logic.append(dataframe['cti'] < self.buy_cti_8.value) - item_buy_logic.append(dataframe['rsi'] < self.buy_rsi_8.value) + item_buy_logic.append(dataframe['close'] < (dataframe['bb20_2_low'] * self.buy_bb_offset_8.value)) item_buy_logic.append(dataframe['rsi_1h'] < self.buy_rsi_1h_8.value) item_buy_logic.append(dataframe['volume'] < (dataframe['volume_mean_4'] * self.buy_volume_8.value)) item_buy_logic.append(dataframe['volume'] > 0) From 860e4b9f113321185838e2c5c8bfaa98542f15ff Mon Sep 17 00:00:00 2001 From: iterativ Date: Wed, 28 Jul 2021 19:34:59 +0300 Subject: [PATCH 09/33] Buy 11: rework. --- NostalgiaForInfinityNext.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index d15bdc97e4..01889455f2 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -1827,10 +1827,10 @@ class NostalgiaForInfinityNext(IStrategy): buy_rsi_1h_10 = DecimalParameter(20.0, 40.0, default=37.0, space='buy', decimals=1, optimize=False, load=True) buy_ma_offset_11 = DecimalParameter(0.93, 0.99, default=0.934, space='buy', decimals=3, optimize=False, load=True) - buy_min_inc_11 = DecimalParameter(0.005, 0.05, default=0.01, space='buy', decimals=3, optimize=False, load=True) + buy_min_inc_11 = DecimalParameter(0.005, 0.05, default=0.02, space='buy', decimals=3, optimize=False, load=True) buy_rsi_1h_min_11 = DecimalParameter(40.0, 60.0, default=55.0, space='buy', decimals=1, optimize=False, load=True) buy_rsi_1h_max_11 = DecimalParameter(70.0, 90.0, default=84.0, space='buy', decimals=1, optimize=False, load=True) - buy_rsi_11 = DecimalParameter(34.0, 50.0, default=48.0, space='buy', decimals=1, optimize=False, load=True) + buy_rsi_11 = DecimalParameter(34.0, 50.0, default=44.0, space='buy', decimals=1, optimize=False, load=True) buy_mfi_11 = DecimalParameter(30.0, 46.0, default=36.0, space='buy', decimals=1, optimize=False, load=True) buy_ma_offset_12 = DecimalParameter(0.93, 0.97, default=0.922, space='buy', decimals=3, optimize=False, load=True) @@ -3477,8 +3477,6 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: if self.buy_params['buy_condition_11_enable']: # Non-Standard protections (add below) buy_protection_list[10].append(dataframe['ema_50_1h'] > dataframe['ema_100_1h']) - buy_protection_list[10].append(dataframe['safe_pump_36_50_1h']) - buy_protection_list[10].append(dataframe['safe_pump_48_100_1h']) # Logic item_buy_logic = [] From c59b25ba1e0222df887fd798294e1d5458923740 Mon Sep 17 00:00:00 2001 From: iterativ Date: Wed, 28 Jul 2021 20:17:17 +0300 Subject: [PATCH 10/33] Buy 12: rework. --- NostalgiaForInfinityNext.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index 01889455f2..19976072ba 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -1833,8 +1833,8 @@ class NostalgiaForInfinityNext(IStrategy): buy_rsi_11 = DecimalParameter(34.0, 50.0, default=44.0, space='buy', decimals=1, optimize=False, load=True) buy_mfi_11 = DecimalParameter(30.0, 46.0, default=36.0, space='buy', decimals=1, optimize=False, load=True) - buy_ma_offset_12 = DecimalParameter(0.93, 0.97, default=0.922, space='buy', decimals=3, optimize=False, load=True) - buy_rsi_12 = DecimalParameter(26.0, 40.0, default=30.0, space='buy', decimals=1, optimize=False, load=True) + buy_ma_offset_12 = DecimalParameter(0.93, 0.97, default=0.907, space='buy', decimals=3, optimize=False, load=True) + buy_rsi_12 = DecimalParameter(26.0, 40.0, default=34.0, space='buy', decimals=1, optimize=False, load=True) buy_ewo_12 = DecimalParameter(1.0, 6.0, default=1.8, space='buy', decimals=1, optimize=False, load=True) buy_ma_offset_13 = DecimalParameter(0.93, 0.98, default=0.99, space='buy', decimals=3, optimize=False, load=True) From 7abb74835d29f4adf270423b3f13d818f7319104 Mon Sep 17 00:00:00 2001 From: iterativ Date: Wed, 28 Jul 2021 22:12:16 +0300 Subject: [PATCH 11/33] Buy 13: rework. --- NostalgiaForInfinityNext.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index 19976072ba..8b6187db2c 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -442,7 +442,7 @@ class NostalgiaForInfinityNext(IStrategy): "sma200_1h_rising" : CategoricalParameter([True, False], default=True, space='buy', optimize=False, load=True), "sma200_1h_rising_val" : CategoricalParameter(["20","30","36","44","50"], default="24", space='buy', optimize=False, load=True), "safe_dips" : CategoricalParameter([True, False], default=True, space='buy', optimize=False, load=True), - "safe_dips_type" : CategoricalParameter(["10","50","100"], default="10", space='buy', optimize=False, load=True), + "safe_dips_type" : CategoricalParameter(["10","50","100"], default="20", space='buy', optimize=False, load=True), "safe_pump" : CategoricalParameter([True, False], default=False, space='buy', optimize=False, load=True), "safe_pump_type" : CategoricalParameter(["10","50","100"], default="50", space='buy', optimize=False, load=True), "safe_pump_period" : CategoricalParameter(["24","36","48"], default="24", space='buy', optimize=False, load=True), @@ -1838,7 +1838,8 @@ class NostalgiaForInfinityNext(IStrategy): buy_ewo_12 = DecimalParameter(1.0, 6.0, default=1.8, space='buy', decimals=1, optimize=False, load=True) buy_ma_offset_13 = DecimalParameter(0.93, 0.98, default=0.99, space='buy', decimals=3, optimize=False, load=True) - buy_ewo_13 = DecimalParameter(-14.0, -7.0, default=-11.4, space='buy', decimals=1, optimize=False, load=True) + buy_cti_13 = DecimalParameter(-0.99, -0.5, default=-0.74, space='buy', decimals=2, optimize=False, load=True) + buy_ewo_13 = DecimalParameter(-14.0, -7.0, default=-9.6, space='buy', decimals=1, optimize=False, load=True) buy_ema_open_mult_14 = DecimalParameter(0.01, 0.03, default=0.014, space='buy', decimals=3, optimize=False, load=True) buy_bb_offset_14 = DecimalParameter(0.98, 1.0, default=0.988, space='buy', decimals=3, optimize=False, load=True) @@ -3527,12 +3528,12 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: if self.buy_params['buy_condition_13_enable']: # Non-Standard protections (add below) buy_protection_list[12].append(dataframe['ema_50_1h'] > dataframe['ema_100_1h']) - # buy_13_protections.append(dataframe['safe_pump_36_loose_1h']) # Logic item_buy_logic = [] item_buy_logic.append(reduce(lambda x, y: x & y, buy_protection_list[12])) item_buy_logic.append(dataframe['close'] < dataframe['sma_30'] * self.buy_ma_offset_13.value) + item_buy_logic.append(dataframe['cti'] < self.buy_cti_13.value) item_buy_logic.append(dataframe['ewo'] < self.buy_ewo_13.value) item_buy_logic.append(dataframe['volume'] > 0) item_buy = reduce(lambda x, y: x & y, item_buy_logic) From 7d3f803d2ab553c19c79f55dbeb6d139a7773698 Mon Sep 17 00:00:00 2001 From: iterativ Date: Thu, 29 Jul 2021 00:08:22 +0300 Subject: [PATCH 12/33] Buy 14: rework. --- NostalgiaForInfinityNext.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index 8b6187db2c..50a13808e2 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -1844,6 +1844,7 @@ class NostalgiaForInfinityNext(IStrategy): buy_ema_open_mult_14 = DecimalParameter(0.01, 0.03, default=0.014, space='buy', decimals=3, optimize=False, load=True) buy_bb_offset_14 = DecimalParameter(0.98, 1.0, default=0.988, space='buy', decimals=3, optimize=False, load=True) buy_ma_offset_14 = DecimalParameter(0.93, 0.99, default=0.98, space='buy', decimals=3, optimize=False, load=True) + buy_cti_14 = DecimalParameter(-0.99, -0.5, default=-0.86, space='buy', decimals=2, optimize=False, load=True) buy_ema_open_mult_15 = DecimalParameter(0.01, 0.03, default=0.018, space='buy', decimals=3, optimize=False, load=True) buy_ma_offset_15 = DecimalParameter(0.93, 0.99, default=0.954, space='buy', decimals=3, optimize=False, load=True) @@ -3560,6 +3561,7 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: item_buy_logic.append((dataframe['ema_26'].shift() - dataframe['ema_12'].shift()) > (dataframe['open'] / 100)) item_buy_logic.append(dataframe['close'] < (dataframe['bb20_2_low'] * self.buy_bb_offset_14.value)) item_buy_logic.append(dataframe['close'] < dataframe['ema_20'] * self.buy_ma_offset_14.value) + item_buy_logic.append(dataframe['cti'] < self.buy_cti_14.value) item_buy_logic.append(dataframe['volume'] > 0) item_buy = reduce(lambda x, y: x & y, item_buy_logic) dataframe.loc[ From d3cf764024d4e2c986acdb97e5f931804683cfdd Mon Sep 17 00:00:00 2001 From: iterativ Date: Thu, 29 Jul 2021 09:06:04 +0300 Subject: [PATCH 13/33] Buy 15: rework. --- NostalgiaForInfinityNext.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index 50a13808e2..39799b800d 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -484,9 +484,9 @@ class NostalgiaForInfinityNext(IStrategy): "sma200_1h_rising" : CategoricalParameter([True, False], default=False, space='buy', optimize=False, load=True), "sma200_1h_rising_val" : CategoricalParameter(["20","30","36","44","50"], default="50", space='buy', optimize=False, load=True), "safe_dips" : CategoricalParameter([True, False], default=True, space='buy', optimize=False, load=True), - "safe_dips_type" : CategoricalParameter(["10","50","100"], default="50", space='buy', optimize=False, load=True), + "safe_dips_type" : CategoricalParameter(["10","50","100"], default="130", space='buy', optimize=False, load=True), "safe_pump" : CategoricalParameter([True, False], default=True, space='buy', optimize=False, load=True), - "safe_pump_type" : CategoricalParameter(["10","50","100"], default="10", space='buy', optimize=False, load=True), + "safe_pump_type" : CategoricalParameter(["10","50","100"], default="20", space='buy', optimize=False, load=True), "safe_pump_period" : CategoricalParameter(["24","36","48"], default="36", space='buy', optimize=False, load=True), "btc_1h_not_downtrend" : CategoricalParameter([True, False], default=False, space='buy', optimize=False, load=True) }, @@ -1846,10 +1846,10 @@ class NostalgiaForInfinityNext(IStrategy): buy_ma_offset_14 = DecimalParameter(0.93, 0.99, default=0.98, space='buy', decimals=3, optimize=False, load=True) buy_cti_14 = DecimalParameter(-0.99, -0.5, default=-0.86, space='buy', decimals=2, optimize=False, load=True) - buy_ema_open_mult_15 = DecimalParameter(0.01, 0.03, default=0.018, space='buy', decimals=3, optimize=False, load=True) - buy_ma_offset_15 = DecimalParameter(0.93, 0.99, default=0.954, space='buy', decimals=3, optimize=False, load=True) + buy_ema_open_mult_15 = DecimalParameter(0.01, 0.03, default=0.024, space='buy', decimals=3, optimize=False, load=True) + buy_ma_offset_15 = DecimalParameter(0.93, 0.99, default=0.968, space='buy', decimals=3, optimize=False, load=True) buy_rsi_15 = DecimalParameter(20.0, 36.0, default=28.0, space='buy', decimals=1, optimize=False, load=True) - buy_ema_rel_15 = DecimalParameter(0.97, 0.999, default=0.988, space='buy', decimals=3, optimize=False, load=True) + buy_ema_rel_15 = DecimalParameter(0.97, 0.999, default=0.978, space='buy', decimals=3, optimize=False, load=True) buy_ma_offset_16 = DecimalParameter(0.93, 0.97, default=0.952, space='buy', decimals=3, optimize=False, load=True) buy_rsi_16 = DecimalParameter(26.0, 50.0, default=31.0, space='buy', decimals=1, optimize=False, load=True) From 335163384a9a7889d3fd81d631bcbe8ad52f9c66 Mon Sep 17 00:00:00 2001 From: iterativ Date: Thu, 29 Jul 2021 11:22:32 +0300 Subject: [PATCH 14/33] Buy 17: rework. --- NostalgiaForInfinityNext.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index 39799b800d..3514395036 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -1854,6 +1854,7 @@ class NostalgiaForInfinityNext(IStrategy): buy_ma_offset_16 = DecimalParameter(0.93, 0.97, default=0.952, space='buy', decimals=3, optimize=False, load=True) buy_rsi_16 = DecimalParameter(26.0, 50.0, default=31.0, space='buy', decimals=1, optimize=False, load=True) buy_ewo_16 = DecimalParameter(2.0, 6.0, default=2.8, space='buy', decimals=1, optimize=False, load=True) + buy_cti_16 = DecimalParameter(-0.99, -0.5, default=-0.84, space='buy', decimals=2, optimize=False, load=True) buy_ma_offset_17 = DecimalParameter(0.93, 0.98, default=0.952, space='buy', decimals=3, optimize=False, load=True) buy_ewo_17 = DecimalParameter(-18.0, -10.0, default=-12.8, space='buy', decimals=1, optimize=False, load=True) @@ -3611,6 +3612,7 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: item_buy_logic.append(dataframe['close'] < dataframe['ema_20'] * self.buy_ma_offset_16.value) item_buy_logic.append(dataframe['ewo'] > self.buy_ewo_16.value) item_buy_logic.append(dataframe['rsi'] < self.buy_rsi_16.value) + item_buy_logic.append(dataframe['cti'] < self.buy_cti_16.value) item_buy_logic.append(dataframe['volume'] > 0) item_buy = reduce(lambda x, y: x & y, item_buy_logic) dataframe.loc[ From 44135697dee0fd4a79e6ae2a1418e9abf7891371 Mon Sep 17 00:00:00 2001 From: iterativ Date: Thu, 29 Jul 2021 11:22:32 +0300 Subject: [PATCH 15/33] Buy 16: rework. --- NostalgiaForInfinityNext.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index 39799b800d..3514395036 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -1854,6 +1854,7 @@ class NostalgiaForInfinityNext(IStrategy): buy_ma_offset_16 = DecimalParameter(0.93, 0.97, default=0.952, space='buy', decimals=3, optimize=False, load=True) buy_rsi_16 = DecimalParameter(26.0, 50.0, default=31.0, space='buy', decimals=1, optimize=False, load=True) buy_ewo_16 = DecimalParameter(2.0, 6.0, default=2.8, space='buy', decimals=1, optimize=False, load=True) + buy_cti_16 = DecimalParameter(-0.99, -0.5, default=-0.84, space='buy', decimals=2, optimize=False, load=True) buy_ma_offset_17 = DecimalParameter(0.93, 0.98, default=0.952, space='buy', decimals=3, optimize=False, load=True) buy_ewo_17 = DecimalParameter(-18.0, -10.0, default=-12.8, space='buy', decimals=1, optimize=False, load=True) @@ -3611,6 +3612,7 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: item_buy_logic.append(dataframe['close'] < dataframe['ema_20'] * self.buy_ma_offset_16.value) item_buy_logic.append(dataframe['ewo'] > self.buy_ewo_16.value) item_buy_logic.append(dataframe['rsi'] < self.buy_rsi_16.value) + item_buy_logic.append(dataframe['cti'] < self.buy_cti_16.value) item_buy_logic.append(dataframe['volume'] > 0) item_buy = reduce(lambda x, y: x & y, item_buy_logic) dataframe.loc[ From 5498026be2eef25b2c47f471c523a31f3e4619b0 Mon Sep 17 00:00:00 2001 From: iterativ Date: Thu, 29 Jul 2021 13:15:26 +0300 Subject: [PATCH 16/33] Buy 17: rework. --- NostalgiaForInfinityNext.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index 3514395036..e2dc85d0a5 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -1857,7 +1857,9 @@ class NostalgiaForInfinityNext(IStrategy): buy_cti_16 = DecimalParameter(-0.99, -0.5, default=-0.84, space='buy', decimals=2, optimize=False, load=True) buy_ma_offset_17 = DecimalParameter(0.93, 0.98, default=0.952, space='buy', decimals=3, optimize=False, load=True) - buy_ewo_17 = DecimalParameter(-18.0, -10.0, default=-12.8, space='buy', decimals=1, optimize=False, load=True) + buy_ewo_17 = DecimalParameter(-18.0, -10.0, default=-12.4, space='buy', decimals=1, optimize=False, load=True) + buy_cti_17 = DecimalParameter(-0.99, -0.5, default=-0.92, space='buy', decimals=2, optimize=False, load=True) + buy_volume_17 = DecimalParameter(0.6, 6.0, default=2.0, space='buy', decimals=1, optimize=False, load=True) buy_rsi_18 = DecimalParameter(16.0, 32.0, default=26.0, space='buy', decimals=1, optimize=False, load=True) buy_bb_offset_18 = DecimalParameter(0.98, 1.0, default=0.982, space='buy', decimals=3, optimize=False, load=True) @@ -3635,6 +3637,8 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: item_buy_logic.append(reduce(lambda x, y: x & y, buy_protection_list[16])) item_buy_logic.append(dataframe['close'] < dataframe['ema_20'] * self.buy_ma_offset_17.value) item_buy_logic.append(dataframe['ewo'] < self.buy_ewo_17.value) + item_buy_logic.append(dataframe['cti'] < self.buy_cti_17.value) + item_buy_logic.append(dataframe['volume'] < (dataframe['volume_mean_4'] * self.buy_volume_17.value)) item_buy_logic.append(dataframe['volume'] > 0) item_buy = reduce(lambda x, y: x & y, item_buy_logic) dataframe.loc[ From b8b56178a4322b7a12f39298bc3a8789d4316797 Mon Sep 17 00:00:00 2001 From: iterativ Date: Thu, 29 Jul 2021 14:58:34 +0300 Subject: [PATCH 17/33] Buy 18: rework. --- NostalgiaForInfinityNext.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index e2dc85d0a5..0d19d2cf11 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -547,7 +547,7 @@ class NostalgiaForInfinityNext(IStrategy): "sma200_1h_rising" : CategoricalParameter([True, False], default=True, space='buy', optimize=False, load=True), "sma200_1h_rising_val" : CategoricalParameter(["20","30","36","44","50"], default="72", space='buy', optimize=False, load=True), "safe_dips" : CategoricalParameter([True, False], default=True, space='buy', optimize=False, load=True), - "safe_dips_type" : CategoricalParameter(["10","50","100"], default="50", space='buy', optimize=False, load=True), + "safe_dips_type" : CategoricalParameter(["10","50","100"], default="100", space='buy', optimize=False, load=True), "safe_pump" : CategoricalParameter([True, False], default=True, space='buy', optimize=False, load=True), "safe_pump_type" : CategoricalParameter(["10","50","100"], default="60", space='buy', optimize=False, load=True), "safe_pump_period" : CategoricalParameter(["24","36","48"], default="24", space='buy', optimize=False, load=True), @@ -1863,6 +1863,7 @@ class NostalgiaForInfinityNext(IStrategy): buy_rsi_18 = DecimalParameter(16.0, 32.0, default=26.0, space='buy', decimals=1, optimize=False, load=True) buy_bb_offset_18 = DecimalParameter(0.98, 1.0, default=0.982, space='buy', decimals=3, optimize=False, load=True) + buy_volume_18 = DecimalParameter(0.6, 6.0, default=2.0, space='buy', decimals=1, optimize=False, load=True) buy_rsi_1h_min_19 = DecimalParameter(40.0, 70.0, default=50.0, space='buy', decimals=1, optimize=False, load=True) buy_chop_min_19 = DecimalParameter(20.0, 60.0, default=22.1, space='buy', decimals=1, optimize=False, load=True) @@ -3664,6 +3665,7 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: item_buy_logic.append(reduce(lambda x, y: x & y, buy_protection_list[17])) item_buy_logic.append(dataframe['rsi'] < self.buy_rsi_18.value) item_buy_logic.append(dataframe['close'] < (dataframe['bb20_2_low'] * self.buy_bb_offset_18.value)) + item_buy_logic.append(dataframe['volume'] < (dataframe['volume_mean_4'] * self.buy_volume_18.value)) item_buy_logic.append(dataframe['volume'] > 0) item_buy = reduce(lambda x, y: x & y, item_buy_logic) dataframe.loc[ From 71bb9fd0b84ef768da12a0caeda95dd31122fdb4 Mon Sep 17 00:00:00 2001 From: iterativ Date: Thu, 29 Jul 2021 16:23:40 +0300 Subject: [PATCH 18/33] Buy 19: rework. --- NostalgiaForInfinityNext.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index 0d19d2cf11..2b1b3b7997 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -569,7 +569,7 @@ class NostalgiaForInfinityNext(IStrategy): "sma200_1h_rising_val" : CategoricalParameter(["20","30","36","44","50"], default="50", space='buy', optimize=False, load=True), "safe_dips" : CategoricalParameter([True, False], default=True, space='buy', optimize=False, load=True), "safe_dips_type" : CategoricalParameter(["10","50","100"], default="50", space='buy', optimize=False, load=True), - "safe_pump" : CategoricalParameter([True, False], default=True, space='buy', optimize=False, load=True), + "safe_pump" : CategoricalParameter([True, False], default=False, space='buy', optimize=False, load=True), "safe_pump_type" : CategoricalParameter(["10","50","100"], default="50", space='buy', optimize=False, load=True), "safe_pump_period" : CategoricalParameter(["24","36","48"], default="24", space='buy', optimize=False, load=True), "btc_1h_not_downtrend" : CategoricalParameter([True, False], default=False, space='buy', optimize=False, load=True) @@ -1866,7 +1866,7 @@ class NostalgiaForInfinityNext(IStrategy): buy_volume_18 = DecimalParameter(0.6, 6.0, default=2.0, space='buy', decimals=1, optimize=False, load=True) buy_rsi_1h_min_19 = DecimalParameter(40.0, 70.0, default=50.0, space='buy', decimals=1, optimize=False, load=True) - buy_chop_min_19 = DecimalParameter(20.0, 60.0, default=22.1, space='buy', decimals=1, optimize=False, load=True) + buy_chop_min_19 = DecimalParameter(20.0, 60.0, default=23.0, space='buy', decimals=1, optimize=False, load=True) buy_rsi_20 = DecimalParameter(20.0, 36.0, default=27.0, space='buy', decimals=1, optimize=False, load=True) buy_rsi_1h_20 = DecimalParameter(14.0, 30.0, default=20.0, space='buy', decimals=1, optimize=False, load=True) @@ -3682,7 +3682,6 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: # ----------------------------------------------------------------------------------------- if self.buy_params['buy_condition_19_enable']: # Non-Standard protections (add below) - buy_protection_list[18].append(dataframe['ema_50_1h'] > dataframe['ema_200_1h']) # Logic item_buy_logic = [] @@ -3692,7 +3691,7 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: item_buy_logic.append(dataframe['close'] > dataframe['ema_100_1h']) item_buy_logic.append(dataframe['rsi_1h'] > self.buy_rsi_1h_min_19.value) item_buy_logic.append(dataframe['chop'] < self.buy_chop_min_19.value) - item_buy_logic.append(dataframe['moderi_64'] == True) + item_buy_logic.append(dataframe['moderi_96'] == True) item_buy_logic.append(dataframe['volume'] > 0) item_buy = reduce(lambda x, y: x & y, item_buy_logic) dataframe.loc[ From 84cdf9958a5773bc9061d7c71bfdf2993c131e9f Mon Sep 17 00:00:00 2001 From: iterativ Date: Thu, 29 Jul 2021 17:23:31 +0300 Subject: [PATCH 19/33] Buy 20: rework. --- NostalgiaForInfinityNext.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index 2b1b3b7997..7502b6950b 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -1868,8 +1868,10 @@ class NostalgiaForInfinityNext(IStrategy): buy_rsi_1h_min_19 = DecimalParameter(40.0, 70.0, default=50.0, space='buy', decimals=1, optimize=False, load=True) buy_chop_min_19 = DecimalParameter(20.0, 60.0, default=23.0, space='buy', decimals=1, optimize=False, load=True) - buy_rsi_20 = DecimalParameter(20.0, 36.0, default=27.0, space='buy', decimals=1, optimize=False, load=True) - buy_rsi_1h_20 = DecimalParameter(14.0, 30.0, default=20.0, space='buy', decimals=1, optimize=False, load=True) + buy_rsi_20 = DecimalParameter(20.0, 36.0, default=30.0, space='buy', decimals=1, optimize=False, load=True) + buy_rsi_1h_20 = DecimalParameter(14.0, 30.0, default=16.0, space='buy', decimals=1, optimize=False, load=True) + buy_cti_20 = DecimalParameter(-0.99, -0.5, default=-0.8, space='buy', decimals=2, optimize=False, load=True) + buy_volume_20 = DecimalParameter(0.6, 6.0, default=2.0, space='buy', decimals=1, optimize=False, load=True) buy_rsi_21 = DecimalParameter(10.0, 28.0, default=23.0, space='buy', decimals=1, optimize=False, load=True) buy_rsi_1h_21 = DecimalParameter(18.0, 40.0, default=24.0, space='buy', decimals=1, optimize=False, load=True) @@ -3714,6 +3716,8 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: item_buy_logic.append(reduce(lambda x, y: x & y, buy_protection_list[19])) item_buy_logic.append(dataframe['rsi'] < self.buy_rsi_20.value) item_buy_logic.append(dataframe['rsi_1h'] < self.buy_rsi_1h_20.value) + item_buy_logic.append(dataframe['cti'] < self.buy_cti_20.value) + item_buy_logic.append(dataframe['volume'] < (dataframe['volume_mean_4'] * self.buy_volume_20.value)) item_buy_logic.append(dataframe['volume'] > 0) item_buy = reduce(lambda x, y: x & y, item_buy_logic) dataframe.loc[ From 127523de304c1543aab126ee52bb9d02672f09c3 Mon Sep 17 00:00:00 2001 From: iterativ Date: Thu, 29 Jul 2021 17:53:11 +0300 Subject: [PATCH 20/33] Buy 21: rework. --- NostalgiaForInfinityNext.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index 7502b6950b..af3e86a524 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -1873,9 +1873,10 @@ class NostalgiaForInfinityNext(IStrategy): buy_cti_20 = DecimalParameter(-0.99, -0.5, default=-0.8, space='buy', decimals=2, optimize=False, load=True) buy_volume_20 = DecimalParameter(0.6, 6.0, default=2.0, space='buy', decimals=1, optimize=False, load=True) - buy_rsi_21 = DecimalParameter(10.0, 28.0, default=23.0, space='buy', decimals=1, optimize=False, load=True) - buy_rsi_1h_21 = DecimalParameter(18.0, 40.0, default=24.0, space='buy', decimals=1, optimize=False, load=True) + buy_rsi_21 = DecimalParameter(10.0, 28.0, default=14.0, space='buy', decimals=1, optimize=False, load=True) + buy_rsi_1h_21 = DecimalParameter(18.0, 40.0, default=28.0, space='buy', decimals=1, optimize=False, load=True) buy_cti_21 = DecimalParameter(-0.99, -0.4, default=-0.9, space='buy', decimals=2, optimize=False, load=True) + buy_volume_21 = DecimalParameter(0.6, 6.0, default=2.0, space='buy', decimals=1, optimize=False, load=True) buy_volume_22 = DecimalParameter(0.5, 6.0, default=3.0, space='buy', decimals=1, optimize=False, load=True) buy_bb_offset_22 = DecimalParameter(0.98, 1.0, default=0.98, space='buy', decimals=3, optimize=False, load=True) @@ -3741,6 +3742,7 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: item_buy_logic.append(dataframe['rsi'] < self.buy_rsi_21.value) item_buy_logic.append(dataframe['rsi_1h'] < self.buy_rsi_1h_21.value) item_buy_logic.append(dataframe['cti'] < self.buy_cti_21.value) + item_buy_logic.append(dataframe['volume'] < (dataframe['volume_mean_4'] * self.buy_volume_21.value)) item_buy_logic.append(dataframe['volume'] > 0) item_buy = reduce(lambda x, y: x & y, item_buy_logic) dataframe.loc[ From 88ef1e42cadc2bb28a6a61a72357d64915b5a86e Mon Sep 17 00:00:00 2001 From: iterativ Date: Thu, 29 Jul 2021 19:08:33 +0300 Subject: [PATCH 21/33] Buy 22: rework. --- NostalgiaForInfinityNext.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index af3e86a524..2b0a9c5ef8 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -1878,10 +1878,10 @@ class NostalgiaForInfinityNext(IStrategy): buy_cti_21 = DecimalParameter(-0.99, -0.4, default=-0.9, space='buy', decimals=2, optimize=False, load=True) buy_volume_21 = DecimalParameter(0.6, 6.0, default=2.0, space='buy', decimals=1, optimize=False, load=True) - buy_volume_22 = DecimalParameter(0.5, 6.0, default=3.0, space='buy', decimals=1, optimize=False, load=True) - buy_bb_offset_22 = DecimalParameter(0.98, 1.0, default=0.98, space='buy', decimals=3, optimize=False, load=True) - buy_ma_offset_22 = DecimalParameter(0.93, 0.98, default=0.941, space='buy', decimals=3, optimize=False, load=True) - buy_ewo_22 = DecimalParameter(2.0, 10.0, default=4.2, space='buy', decimals=1, optimize=False, load=True) + buy_volume_22 = DecimalParameter(0.5, 6.0, default=2.0, space='buy', decimals=1, optimize=False, load=True) + buy_bb_offset_22 = DecimalParameter(0.98, 1.0, default=0.984, space='buy', decimals=3, optimize=False, load=True) + buy_ma_offset_22 = DecimalParameter(0.93, 0.98, default=0.946, space='buy', decimals=3, optimize=False, load=True) + buy_ewo_22 = DecimalParameter(2.0, 10.0, default=6.2, space='buy', decimals=1, optimize=False, load=True) buy_rsi_22 = DecimalParameter(26.0, 56.0, default=37.0, space='buy', decimals=1, optimize=False, load=True) buy_bb_offset_23 = DecimalParameter(0.97, 1.0, default=0.983, space='buy', decimals=3, optimize=False, load=True) From fc55982224622c3e846cbc4f955b8607a4517c87 Mon Sep 17 00:00:00 2001 From: iterativ Date: Thu, 29 Jul 2021 20:39:36 +0300 Subject: [PATCH 22/33] Buy 24: rework. --- NostalgiaForInfinityNext.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index 2b0a9c5ef8..10abb19fda 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -1889,7 +1889,7 @@ class NostalgiaForInfinityNext(IStrategy): buy_rsi_23 = DecimalParameter(20.0, 40.0, default=30.0, space='buy', decimals=1, optimize=False, load=True) buy_rsi_1h_23 = DecimalParameter(60.0, 80.0, default=70.0, space='buy', decimals=1, optimize=False, load=True) - buy_24_rsi_max = DecimalParameter(26.0, 60.0, default=60.0, space='buy', decimals=1, optimize=False, load=True) + buy_24_rsi_max = DecimalParameter(26.0, 60.0, default=50.0, space='buy', decimals=1, optimize=False, load=True) buy_24_rsi_1h_min = DecimalParameter(40.0, 90.0, default=66.9, space='buy', decimals=1, optimize=False, load=True) buy_25_ma_offset = DecimalParameter(0.90, 0.99, default=0.922, space='buy', optimize=False, load=True) @@ -3816,7 +3816,6 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: item_buy_logic = [] item_buy_logic.append(reduce(lambda x, y: x & y, buy_protection_list[23])) item_buy_logic.append(dataframe['ema_12_1h'].shift(12) < dataframe['ema_35_1h'].shift(12)) - item_buy_logic.append(dataframe['ema_12_1h'].shift(12) < dataframe['ema_35_1h'].shift(12)) item_buy_logic.append(dataframe['ema_12_1h'] > dataframe['ema_35_1h']) item_buy_logic.append(dataframe['cmf_1h'].shift(12) < 0) item_buy_logic.append(dataframe['cmf_1h'] > 0) From faab7e6101148666fe95c298c636254f780da873 Mon Sep 17 00:00:00 2001 From: iterativ Date: Thu, 29 Jul 2021 21:05:37 +0300 Subject: [PATCH 23/33] Buy 25: rework. --- NostalgiaForInfinityNext.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index 10abb19fda..56925adde9 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -1894,6 +1894,7 @@ class NostalgiaForInfinityNext(IStrategy): buy_25_ma_offset = DecimalParameter(0.90, 0.99, default=0.922, space='buy', optimize=False, load=True) buy_25_rsi_14 = DecimalParameter(26.0, 40.0, default=38.0, space='buy', decimals=1, optimize=False, load=True) + buy_25_cti = DecimalParameter(-0.99, -0.4, default=-0.6, space='buy', decimals=2, optimize=False, load=True) buy_26_zema_low_offset = DecimalParameter(0.90, 0.99, default=0.93, space='buy', optimize=False, load=True) @@ -3850,7 +3851,7 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: (dataframe['open'] < dataframe['ema_20_1h']) & (dataframe['low'] < dataframe['ema_20_1h']) | (dataframe['open'] > dataframe['ema_20_1h']) & (dataframe['low'] > dataframe['ema_20_1h']) ) - item_buy_logic.append(dataframe['cti'] < -0.6) + item_buy_logic.append(dataframe['cti'] < self.buy_25_cti.value) item_buy = reduce(lambda x, y: x & y, item_buy_logic) dataframe.loc[ item_buy, From ae321dcee2c0fefd718e1e7916367218c603f906 Mon Sep 17 00:00:00 2001 From: iterativ Date: Thu, 29 Jul 2021 22:22:13 +0300 Subject: [PATCH 24/33] Buy 26: rename zema. --- NostalgiaForInfinityNext.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index 56925adde9..d42f533320 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -3049,7 +3049,7 @@ def normal_tf_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFram dataframe['chop']= qtpylib.chopiness(dataframe, 14) # Zero-Lag EMA - dataframe['zema'] = zema(dataframe, period=61) + dataframe['zema_61'] = zema(dataframe, period=61) # Williams %R dataframe['r_480'] = williams_r(dataframe, period=480) @@ -3871,7 +3871,7 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: # Logic item_buy_logic = [] item_buy_logic.append(reduce(lambda x, y: x & y, buy_protection_list[25])) - item_buy_logic.append(dataframe['close'] < (dataframe['zema'] * self.buy_26_zema_low_offset.value)) + item_buy_logic.append(dataframe['close'] < (dataframe['zema_61'] * self.buy_26_zema_low_offset.value)) item_buy_logic.append(dataframe['volume'] > 0) item_buy = reduce(lambda x, y: x & y, item_buy_logic) dataframe.loc[ From 7a532b65cea10b21f473a8225b52a5688c9d12d1 Mon Sep 17 00:00:00 2001 From: iterativ Date: Thu, 29 Jul 2021 23:08:43 +0300 Subject: [PATCH 25/33] Buy 27: rework. --- NostalgiaForInfinityNext.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index d42f533320..a7fb76c723 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -735,8 +735,8 @@ class NostalgiaForInfinityNext(IStrategy): "sma200_rising_val" : CategoricalParameter(["20","30","36","44","50"], default="30", space='buy', optimize=False, load=True), "sma200_1h_rising" : CategoricalParameter([True, False], default=False, space='buy', optimize=False, load=True), "sma200_1h_rising_val" : CategoricalParameter(["20","30","36","44","50"], default="50", space='buy', optimize=False, load=True), - "safe_dips" : CategoricalParameter([True, False], default=False, space='buy', optimize=False, load=True), - "safe_dips_type" : CategoricalParameter(["10","50","100"], default="10", space='buy', optimize=False, load=True), + "safe_dips" : CategoricalParameter([True, False], default=True, space='buy', optimize=False, load=True), + "safe_dips_type" : CategoricalParameter(["10","50","100"], default="100", space='buy', optimize=False, load=True), "safe_pump" : CategoricalParameter([True, False], default=True, space='buy', optimize=False, load=True), "safe_pump_type" : CategoricalParameter(["10","50","100"], default="50", space='buy', optimize=False, load=True), "safe_pump_period" : CategoricalParameter(["24","36","48"], default="36", space='buy', optimize=False, load=True), @@ -1898,9 +1898,11 @@ class NostalgiaForInfinityNext(IStrategy): buy_26_zema_low_offset = DecimalParameter(0.90, 0.99, default=0.93, space='buy', optimize=False, load=True) - buy_27_wr_max = DecimalParameter(95, 99, default=95.4, space='buy', decimals=1, optimize=False, load=True) + buy_27_wr_max = DecimalParameter(95, 99, default=99.0, space='buy', decimals=1, optimize=False, load=True) buy_27_wr_1h_max = DecimalParameter(90, 99, default=97.6, space='buy', decimals=1, optimize=False, load=True) buy_27_rsi_max = DecimalParameter(40, 70, default=50, space='buy', decimals=0, optimize=False, load=True) + buy_27_cti = DecimalParameter(-0.99, -0.4, default=-0.9, space='buy', decimals=2, optimize=False, load=True) + buy_27_volume = DecimalParameter(0.6, 6.0, default=2.0, space='buy', decimals=1, optimize=False, load=True) # Sell @@ -3895,6 +3897,8 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: item_buy_logic.append(dataframe['r_480'] < -self.buy_27_wr_max.value) item_buy_logic.append(dataframe['r_480_1h'] < -self.buy_27_wr_1h_max.value) item_buy_logic.append(dataframe['rsi_1h'] + dataframe['rsi'] < self.buy_27_rsi_max.value) + item_buy_logic.append(dataframe['cti'] < self.buy_27_cti.value) + item_buy_logic.append(dataframe['volume'] < (dataframe['volume_mean_4'] * self.buy_27_volume.value)) item_buy_logic.append(dataframe['volume'] > 0) item_buy = reduce(lambda x, y: x & y, item_buy_logic) dataframe.loc[ From 445a46cf4469266d2b4ac3e442f6d440e357baa6 Mon Sep 17 00:00:00 2001 From: iterativ Date: Thu, 29 Jul 2021 23:35:25 +0300 Subject: [PATCH 26/33] Buy 28: add HO params, replace hardcoded. --- NostalgiaForInfinityNext.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index a7fb76c723..d212b85ec9 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -1904,6 +1904,11 @@ class NostalgiaForInfinityNext(IStrategy): buy_27_cti = DecimalParameter(-0.99, -0.4, default=-0.9, space='buy', decimals=2, optimize=False, load=True) buy_27_volume = DecimalParameter(0.6, 6.0, default=2.0, space='buy', decimals=1, optimize=False, load=True) + buy_28_ma_offset = DecimalParameter(0.90, 0.99, default=0.92, space='buy', optimize=False, load=True) + buy_28_ewo = DecimalParameter(2.0, 14.0, default=12.4, space='buy', decimals=1, optimize=False, load=True) + buy_28_rsi = DecimalParameter(24.0, 44.0, default=38.0, space='buy', decimals=1, optimize=False, load=True) + buy_28_cti = DecimalParameter(-0.99, -0.4, default=-0.6, space='buy', decimals=2, optimize=False, load=True) + # Sell sell_condition_1_enable = CategoricalParameter([True, False], default=True, space='sell', optimize=False, load=True) @@ -3920,10 +3925,10 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: item_buy_logic = [] item_buy_logic.append(reduce(lambda x, y: x & y, buy_protection_list[27])) item_buy_logic.append(dataframe['moderi_64'] == True) - item_buy_logic.append(dataframe['close'] < dataframe['hull_75'] * 0.92) - item_buy_logic.append(dataframe['ewo'] > 12.4) - item_buy_logic.append(dataframe['rsi'] < 38.0) - item_buy_logic.append(dataframe['cti'] < -0.6) + item_buy_logic.append(dataframe['close'] < dataframe['hull_75'] * self.buy_28_ma_offset.value) + item_buy_logic.append(dataframe['ewo'] > self.buy_28_ewo.value) + item_buy_logic.append(dataframe['rsi'] < self.buy_28_rsi.value) + item_buy_logic.append(dataframe['cti'] < self.buy_28_cti.value) item_buy_logic.append(dataframe['volume'] > 0) item_buy = reduce(lambda x, y: x & y, item_buy_logic) dataframe.loc[ From 838d7efba06a5dda20f1e4a5dafefb9c5fe7df92 Mon Sep 17 00:00:00 2001 From: iterativ Date: Fri, 30 Jul 2021 00:21:21 +0300 Subject: [PATCH 27/33] Buy 29: rework. --- NostalgiaForInfinityNext.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index d212b85ec9..4f75704991 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -1909,6 +1909,10 @@ class NostalgiaForInfinityNext(IStrategy): buy_28_rsi = DecimalParameter(24.0, 44.0, default=38.0, space='buy', decimals=1, optimize=False, load=True) buy_28_cti = DecimalParameter(-0.99, -0.4, default=-0.6, space='buy', decimals=2, optimize=False, load=True) + buy_29_ma_offset = DecimalParameter(0.90, 0.99, default=0.91, space='buy', optimize=False, load=True) + buy_29_ewo = DecimalParameter(-14.0, -2.0, default=-4.0, space='buy', decimals=1, optimize=False, load=True) + buy_29_cti = DecimalParameter(-0.99, -0.4, default=-0.82, space='buy', decimals=2, optimize=False, load=True) + # Sell sell_condition_1_enable = CategoricalParameter([True, False], default=True, space='sell', optimize=False, load=True) @@ -3949,8 +3953,9 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: item_buy_logic = [] item_buy_logic.append(reduce(lambda x, y: x & y, buy_protection_list[28])) item_buy_logic.append(dataframe['moderi_64'] == True) - item_buy_logic.append(dataframe['close'] < dataframe['hull_75'] * 0.9) - item_buy_logic.append(dataframe['ewo'] < -4.0) + item_buy_logic.append(dataframe['close'] < dataframe['hull_75'] * self.buy_29_ma_offset.value) + item_buy_logic.append(dataframe['ewo'] < self.buy_29_ewo.value) + item_buy_logic.append(dataframe['cti'] < self.buy_29_cti.value) item_buy_logic.append(dataframe['volume'] > 0) item_buy = reduce(lambda x, y: x & y, item_buy_logic) dataframe.loc[ From e4f78f62fb835b24857c0bded94b9cdbaaea18dd Mon Sep 17 00:00:00 2001 From: iterativ Date: Fri, 30 Jul 2021 01:06:30 +0300 Subject: [PATCH 28/33] Buy 30: rework. --- NostalgiaForInfinityNext.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index 4f75704991..dcdf57ced4 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -1913,6 +1913,11 @@ class NostalgiaForInfinityNext(IStrategy): buy_29_ewo = DecimalParameter(-14.0, -2.0, default=-4.0, space='buy', decimals=1, optimize=False, load=True) buy_29_cti = DecimalParameter(-0.99, -0.4, default=-0.82, space='buy', decimals=2, optimize=False, load=True) + buy_30_ma_offset = DecimalParameter(0.90, 0.99, default=0.97, space='buy', optimize=False, load=True) + buy_30_ewo = DecimalParameter(2.0, 14.0, default=7.8, space='buy', decimals=1, optimize=False, load=True) + buy_30_rsi = DecimalParameter(24.0, 48.0, default=42.0, space='buy', decimals=1, optimize=False, load=True) + buy_30_cti = DecimalParameter(-0.99, -0.4, default=-0.8, space='buy', decimals=2, optimize=False, load=True) + # Sell sell_condition_1_enable = CategoricalParameter([True, False], default=True, space='sell', optimize=False, load=True) @@ -3976,9 +3981,10 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: item_buy_logic = [] item_buy_logic.append(reduce(lambda x, y: x & y, buy_protection_list[29])) item_buy_logic.append(dataframe['moderi_64'] == False) - item_buy_logic.append(dataframe['close'] < dataframe['zlema_68'] * 0.97) - item_buy_logic.append(dataframe['ewo'] > 9.0) - item_buy_logic.append(dataframe['rsi'] < 42.0) + item_buy_logic.append(dataframe['close'] < dataframe['zlema_68'] * self.buy_30_ma_offset.value) + item_buy_logic.append(dataframe['ewo'] > self.buy_30_ewo.value) + item_buy_logic.append(dataframe['rsi'] < self.buy_30_rsi.value) + item_buy_logic.append(dataframe['cti'] < self.buy_30_cti.value) item_buy_logic.append(dataframe['volume'] > 0) item_buy = reduce(lambda x, y: x & y, item_buy_logic) dataframe.loc[ From 7e51176ebf2e492cc15c855a42ec774c878eb147 Mon Sep 17 00:00:00 2001 From: iterativ Date: Fri, 30 Jul 2021 01:54:03 +0300 Subject: [PATCH 29/33] Buy 31: rework. --- NostalgiaForInfinityNext.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index dcdf57ced4..7ca22ba530 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -1918,6 +1918,10 @@ class NostalgiaForInfinityNext(IStrategy): buy_30_rsi = DecimalParameter(24.0, 48.0, default=42.0, space='buy', decimals=1, optimize=False, load=True) buy_30_cti = DecimalParameter(-0.99, -0.4, default=-0.8, space='buy', decimals=2, optimize=False, load=True) + buy_31_ma_offset = DecimalParameter(0.90, 0.99, default=0.94, space='buy', optimize=False, load=True) + buy_31_ewo = DecimalParameter(-22.0, -8.0, default=-19.0, space='buy', decimals=1, optimize=False, load=True) + buy_31_wr = DecimalParameter(-99.9, -95.0, default=-98.4, space='buy', decimals=1, optimize=False, load=True) + # Sell sell_condition_1_enable = CategoricalParameter([True, False], default=True, space='sell', optimize=False, load=True) @@ -4005,9 +4009,9 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: item_buy_logic = [] item_buy_logic.append(reduce(lambda x, y: x & y, buy_protection_list[30])) item_buy_logic.append(dataframe['moderi_64'] == False) - item_buy_logic.append(dataframe['close'] < dataframe['zlema_68'] * 0.94) - item_buy_logic.append(dataframe['ewo'] < -19.0) - item_buy_logic.append(dataframe['r_480'] < -99.0) + item_buy_logic.append(dataframe['close'] < dataframe['zlema_68'] * self.buy_31_ma_offset.value ) + item_buy_logic.append(dataframe['ewo'] < self.buy_31_ewo.value) + item_buy_logic.append(dataframe['r_480'] < self.buy_31_wr.value) item_buy_logic.append(dataframe['volume'] > 0) item_buy = reduce(lambda x, y: x & y, item_buy_logic) dataframe.loc[ From ff570c6156c70e6d5ff3501e18be9a02e764f501 Mon Sep 17 00:00:00 2001 From: iterativ Date: Fri, 30 Jul 2021 02:23:15 +0300 Subject: [PATCH 30/33] Buy 32: add HO params, replace hardcoded. --- NostalgiaForInfinityNext.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index 7ca22ba530..76c5a5805d 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -1922,6 +1922,11 @@ class NostalgiaForInfinityNext(IStrategy): buy_31_ewo = DecimalParameter(-22.0, -8.0, default=-19.0, space='buy', decimals=1, optimize=False, load=True) buy_31_wr = DecimalParameter(-99.9, -95.0, default=-98.4, space='buy', decimals=1, optimize=False, load=True) + buy_32_ma_offset = DecimalParameter(0.90, 0.99, default=0.946, space='buy', optimize=False, load=True) + buy_32_dip = DecimalParameter(0.001, 0.02, default=0.005, space='buy', decimals=3, optimize=False, load=True) + buy_32_rsi = DecimalParameter(24.0, 50.0, default=46.0, space='buy', decimals=1, optimize=False, load=True) + buy_32_cti = DecimalParameter(-0.99, -0.4, default=-0.8, space='buy', decimals=2, optimize=False, load=True) + # Sell sell_condition_1_enable = CategoricalParameter([True, False], default=True, space='sell', optimize=False, load=True) @@ -4035,12 +4040,12 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: item_buy_logic.append(dataframe['moderi_32']) item_buy_logic.append(dataframe['moderi_64']) item_buy_logic.append(dataframe['moderi_96']) - item_buy_logic.append(dataframe['cti'] < -0.8) + item_buy_logic.append(dataframe['cti'] < self.buy_32_cti.value) item_buy_logic.append(dataframe['rsi_20'] < dataframe['rsi_20'].shift(1)) - item_buy_logic.append(dataframe['rsi_4'] < 46.0) + item_buy_logic.append(dataframe['rsi_4'] < self.buy_32_rsi.value) item_buy_logic.append(dataframe['ema_20_1h'] > dataframe['ema_25_1h']) - item_buy_logic.append((dataframe['open'] - dataframe['close']) / dataframe['close'] < 0.005) - item_buy_logic.append(dataframe['close'] < (dataframe['sma_15'] * 0.946)) + item_buy_logic.append((dataframe['open'] - dataframe['close']) / dataframe['close'] < self.buy_32_dip.value) + item_buy_logic.append(dataframe['close'] < (dataframe['sma_15'] * self.buy_32_ma_offset.value)) item_buy_logic.append( ((dataframe['open'] < dataframe['ema_20_1h']) & (dataframe['low'] < dataframe['ema_20_1h'])) | ((dataframe['open'] > dataframe['ema_20_1h']) & (dataframe['low'] > dataframe['ema_20_1h']))) From 47225bb0a330d1385806b0c57d2e43b0441ee57d Mon Sep 17 00:00:00 2001 From: iterativ Date: Fri, 30 Jul 2021 10:34:31 +0300 Subject: [PATCH 31/33] Buy 33: rework. --- NostalgiaForInfinityNext.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index 76c5a5805d..50045f83b8 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -851,8 +851,8 @@ class NostalgiaForInfinityNext(IStrategy): "enable" : CategoricalParameter([True, False], default=True, space='buy', optimize=False, load=True), "ema_fast" : CategoricalParameter([True, False], default=False, space='buy', optimize=False, load=True), "ema_fast_len" : CategoricalParameter(["26","50","100","200"], default="50", space='buy', optimize=False, load=True), - "ema_slow" : CategoricalParameter([True, False], default=False, space='buy', optimize=False, load=True), - "ema_slow_len" : CategoricalParameter(["26","50","100","200"], default="100", space='buy', optimize=False, load=True), + "ema_slow" : CategoricalParameter([True, False], default=True, space='buy', optimize=False, load=True), + "ema_slow_len" : CategoricalParameter(["26","50","100","200"], default="50", space='buy', optimize=False, load=True), "close_above_ema_fast" : CategoricalParameter([True, False], default=False, space='buy', optimize=False, load=True), "close_above_ema_fast_len" : CategoricalParameter(["12","20","26","50","100","200"], default="50", space='buy', optimize=False, load=True), "close_above_ema_slow" : CategoricalParameter([True, False], default=False, space='buy', optimize=False, load=True), @@ -1927,6 +1927,12 @@ class NostalgiaForInfinityNext(IStrategy): buy_32_rsi = DecimalParameter(24.0, 50.0, default=46.0, space='buy', decimals=1, optimize=False, load=True) buy_32_cti = DecimalParameter(-0.99, -0.4, default=-0.8, space='buy', decimals=2, optimize=False, load=True) + buy_33_ma_offset = DecimalParameter(0.90, 0.99, default=0.974, space='buy', optimize=False, load=True) + buy_33_rsi = DecimalParameter(24.0, 50.0, default=32.0, space='buy', decimals=1, optimize=False, load=True) + buy_33_cti = DecimalParameter(-0.99, -0.4, default=-0.9, space='buy', decimals=2, optimize=False, load=True) + buy_33_ewo = DecimalParameter(2.0, 14.0, default=9.0, space='buy', decimals=1, optimize=False, load=True) + buy_33_volume = DecimalParameter(0.6, 6.0, default=2.0, space='buy', decimals=1, optimize=False, load=True) + # Sell sell_condition_1_enable = CategoricalParameter([True, False], default=True, space='sell', optimize=False, load=True) @@ -4070,11 +4076,11 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: item_buy_logic = [] item_buy_logic.append(reduce(lambda x, y: x & y, buy_protection_list[32])) item_buy_logic.append(dataframe['moderi_96']) - item_buy_logic.append(dataframe['cti'] < -0.8) - item_buy_logic.append((dataframe['open'] - dataframe['close']) / dataframe['close'] < 0.005) - item_buy_logic.append(dataframe['close'] < (dataframe['ema_13'] * 0.954)) - item_buy_logic.append(dataframe['ewo'] > 11.0) - item_buy_logic.append(dataframe['rsi'] < 36.0) + item_buy_logic.append(dataframe['cti'] < self.buy_33_cti.value) + item_buy_logic.append(dataframe['close'] < (dataframe['ema_13'] * self.buy_33_ma_offset.value)) + item_buy_logic.append(dataframe['ewo'] > self.buy_33_ewo.value) + item_buy_logic.append(dataframe['rsi'] < self.buy_33_rsi.value) + item_buy_logic.append(dataframe['volume'] < (dataframe['volume_mean_4'] * self.buy_33_volume.value)) item_buy_logic.append(dataframe['volume'] > 0) item_buy = reduce(lambda x, y: x & y, item_buy_logic) dataframe.loc[ From a8a3d8ae5d70aef9addd4f8ced0feba19c32daa0 Mon Sep 17 00:00:00 2001 From: iterativ Date: Fri, 30 Jul 2021 11:45:42 +0300 Subject: [PATCH 32/33] Buy 34: add HO params, replace hardcoded. --- NostalgiaForInfinityNext.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index 50045f83b8..878caffb05 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -1933,6 +1933,12 @@ class NostalgiaForInfinityNext(IStrategy): buy_33_ewo = DecimalParameter(2.0, 14.0, default=9.0, space='buy', decimals=1, optimize=False, load=True) buy_33_volume = DecimalParameter(0.6, 6.0, default=2.0, space='buy', decimals=1, optimize=False, load=True) + buy_34_ma_offset = DecimalParameter(0.90, 0.99, default=0.968, space='buy', optimize=False, load=True) + buy_34_dip = DecimalParameter(0.001, 0.02, default=0.002, space='buy', decimals=3, optimize=False, load=True) + buy_34_ewo = DecimalParameter(-24.0, -8.0, default=-20.0, space='buy', decimals=1, optimize=False, load=True) + buy_34_cti = DecimalParameter(-0.99, -0.4, default=-0.88, space='buy', decimals=2, optimize=False, load=True) + buy_34_volume = DecimalParameter(0.6, 6.0, default=1.1, space='buy', decimals=1, optimize=False, load=True) + # Sell sell_condition_1_enable = CategoricalParameter([True, False], default=True, space='sell', optimize=False, load=True) @@ -4101,11 +4107,11 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: item_buy_logic = [] item_buy_logic.append(reduce(lambda x, y: x & y, buy_protection_list[33])) - item_buy_logic.append(dataframe['cti'] < -0.88) - item_buy_logic.append(dataframe['volume'] < (dataframe['volume_mean_4'] * 1.1)) - item_buy_logic.append((dataframe['open'] - dataframe['close']) / dataframe['close'] < 0.002) - item_buy_logic.append(dataframe['close'] < dataframe['ema_13'] * 0.968) - item_buy_logic.append(dataframe['ewo'] < -20.0) + item_buy_logic.append(dataframe['cti'] < self.buy_34_cti.value) + item_buy_logic.append((dataframe['open'] - dataframe['close']) / dataframe['close'] < self.buy_34_dip.value) + item_buy_logic.append(dataframe['close'] < dataframe['ema_13'] * self.buy_34_ma_offset.value) + item_buy_logic.append(dataframe['ewo'] < self.buy_34_ewo.value) + item_buy_logic.append(dataframe['volume'] < (dataframe['volume_mean_4'] * self.buy_34_volume.value)) item_buy_logic.append(dataframe['volume'] > 0) item_buy = reduce(lambda x, y: x & y, item_buy_logic) dataframe.loc[ From 5be8529f29ea2d37190780e22bdb05eb425c9205 Mon Sep 17 00:00:00 2001 From: iterativ Date: Fri, 30 Jul 2021 12:00:00 +0300 Subject: [PATCH 33/33] Buy 2: fine tune. --- NostalgiaForInfinityNext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NostalgiaForInfinityNext.py b/NostalgiaForInfinityNext.py index 878caffb05..f8d302e606 100644 --- a/NostalgiaForInfinityNext.py +++ b/NostalgiaForInfinityNext.py @@ -1784,7 +1784,7 @@ class NostalgiaForInfinityNext(IStrategy): buy_rsi_1h_min_2 = DecimalParameter(30.0, 40.0, default=32.0, space='buy', decimals=1, optimize=False, load=True) buy_rsi_1h_max_2 = DecimalParameter(70.0, 95.0, default=84.0, space='buy', decimals=1, optimize=False, load=True) - buy_rsi_1h_diff_2 = DecimalParameter(30.0, 50.0, default=38.0, space='buy', decimals=1, optimize=False, load=True) + buy_rsi_1h_diff_2 = DecimalParameter(30.0, 50.0, default=38.8, space='buy', decimals=1, optimize=False, load=True) buy_mfi_2 = DecimalParameter(30.0, 56.0, default=49.0, space='buy', decimals=1, optimize=False, load=True) buy_bb_offset_2 = DecimalParameter(0.97, 0.999, default=0.983, space='buy', decimals=3, optimize=False, load=True) buy_volume_2 = DecimalParameter(0.6, 6.0, default=1.6, space='buy', decimals=1, optimize=False, load=True)