diff --git a/NostalgiaForInfinityNextGen.py b/NostalgiaForInfinityNextGen.py index 4a60580968..4b6254746d 100644 --- a/NostalgiaForInfinityNextGen.py +++ b/NostalgiaForInfinityNextGen.py @@ -188,6 +188,7 @@ class NostalgiaForInfinityNextGen(IStrategy): "buy_condition_6_enable": True, "buy_condition_7_enable": True, "buy_condition_8_enable": True, + "buy_condition_9_enable": True, ############# } @@ -423,6 +424,34 @@ class NostalgiaForInfinityNextGen(IStrategy): "close_over_pivot_offset" : 1.0, "close_under_pivot_type" : "none", # pivot, sup1, sup2, sup3, res1, res2, res3 "close_under_pivot_offset" : 1.15 + }, + 9: { + "ema_fast" : False, + "ema_fast_len" : "50", + "ema_slow" : True, + "ema_slow_len" : "12", + "close_above_ema_fast" : False, + "close_above_ema_fast_len" : "200", + "close_above_ema_slow" : False, + "close_above_ema_slow_len" : "200", + "sma200_rising" : False, + "sma200_rising_val" : "24", + "sma200_1h_rising" : False, + "sma200_1h_rising_val" : "50", + "safe_dips_threshold_0" : 0.04, + "safe_dips_threshold_2" : 0.1, + "safe_dips_threshold_12" : 0.26, + "safe_dips_threshold_144" : 0.38, + "safe_pump_6h_threshold" : None, + "safe_pump_12h_threshold" : None, + "safe_pump_24h_threshold" : None, + "safe_pump_36h_threshold" : None, + "safe_pump_48h_threshold" : 0.9, + "btc_1h_not_downtrend" : False, + "close_over_pivot_type" : "none", # pivot, sup1, sup2, sup3, res1, res2, res3 + "close_over_pivot_offset" : 1.0, + "close_under_pivot_type" : "none", # pivot, sup1, sup2, sup3, res1, res2, res3 + "close_under_pivot_offset" : 1.0 } } @@ -2071,6 +2100,20 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: item_buy_logic.append(dataframe['r_14'] < -90.0) item_buy_logic.append(dataframe['cti_1h'] < -0.25) + # Condition #9 - Semi swing. Local deep. Uptrend, 1h uptrend. + elif index == 9: + # Non-Standard protections + + # Logic + item_buy_logic.append(dataframe['ema_20_1h'] > dataframe['ema_25_1h']) + item_buy_logic.append(dataframe['close'].shift(1) < (dataframe['sma_15'].shift(1) * 0.97)) + item_buy_logic.append(dataframe['close'] > (dataframe['open'].shift(1))) + item_buy_logic.append(dataframe['ewo'] > 4.4) + item_buy_logic.append(dataframe['cti'] < -0.75) + item_buy_logic.append(dataframe['r_14'].shift(1) < -94.0) + item_buy_logic.append(dataframe['ewo_1h'] > 2.0) + item_buy_logic.append(dataframe['cti_1h'] < -0.75) + item_buy_logic.append(dataframe['volume'] > 0) item_buy = reduce(lambda x, y: x & y, item_buy_logic) dataframe.loc[item_buy, 'buy_tag'] += f"{index} "