From 53ecdcd00173d8f1b37279dbe13575c6b6445f60 Mon Sep 17 00:00:00 2001 From: iterativ Date: Wed, 4 Dec 2024 01:34:23 +0200 Subject: [PATCH 1/2] X5: add global protection rule (Short). --- NostalgiaForInfinityX5.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/NostalgiaForInfinityX5.py b/NostalgiaForInfinityX5.py index 91b314ec1a..57c7384c83 100644 --- a/NostalgiaForInfinityX5.py +++ b/NostalgiaForInfinityX5.py @@ -5033,6 +5033,27 @@ def populate_indicators(self, df: DataFrame, metadata: dict) -> DataFrame: | (df["RSI_14_1d"] > 80.0) | (df["ROC_9_1d"] < 40.0) ) + # 15m & 1h & 4h & 1d up move, 15m & 1h still not high enough, 4h & 1d stil not high enough & uptrend + & ( + (df["RSI_3_15m"] < 80.0) + | (df["RSI_3_1h"] < 80.0) + | (df["RSI_3_4h"] < 80.0) + | (df["RSI_3_1d"] < 95.0) + | (df["RSI_14_15m"] > 85.0) + | (df["CCI_20_15m"] > 250.0) + | (df["RSI_14_1h"] > 85.0) + | (df["CCI_20_1h"] > 250.0) + | (df["CCI_20_change_pct_1h"] < -0.0) + | (df["STOCHRSIk_14_14_3_3_1h"] > 90.0) + | (df["RSI_14_4h"] > 85.0) + | (df["CCI_20_4h"] > 250.0) + | (df["CCI_20_change_pct_4h"] < -0.0) + | (df["STOCHRSIk_14_14_3_3_4h"] > 90.0) + | (df["ROC_9_4h"] < 30.0) + | (df["RSI_14_1d"] > 90.0) + | (df["WILLR_14_1d"] > -10.0) + | (df["ROC_9_1d"] < 50.0) + ) # 15m & 1h & 4h & 1d up move, 1h still not high enough, 1d still low, 4h & 1d uptrend & ( (df["RSI_3_15m"] < 80.0) From 8be194e1eac4289987261d49d0804db8993b127b Mon Sep 17 00:00:00 2001 From: iterativ Date: Wed, 4 Dec 2024 02:38:32 +0200 Subject: [PATCH 2/2] X5: add global protection rule (Short). --- NostalgiaForInfinityX5.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/NostalgiaForInfinityX5.py b/NostalgiaForInfinityX5.py index 57c7384c83..3130c82f70 100644 --- a/NostalgiaForInfinityX5.py +++ b/NostalgiaForInfinityX5.py @@ -66,7 +66,7 @@ class NostalgiaForInfinityX5(IStrategy): INTERFACE_VERSION = 3 def version(self) -> str: - return "v15.1.258" + return "v15.1.259" stoploss = -0.99 @@ -5110,6 +5110,21 @@ def populate_indicators(self, df: DataFrame, metadata: dict) -> DataFrame: | (df["STOCHRSIk_14_14_3_3_1d"] > 80.0) | (df["ROC_9_1d"] < 40.0) ) + # 15m & 1h & 4h up move, 15m & 1h still not high enough, 4h still not high enough & uptrend + & ( + (df["RSI_3_15m"] < 95.0) + | (df["RSI_3_1h"] < 90.0) + | (df["RSI_3_4h"] < 90.0) + | (df["RSI_14_15m"] > 90.0) + | (df["CCI_20_15m"] > 250.0) + | (df["RSI_14_1h"] > 90.0) + | (df["AROOND_14_1h"] < 25.0) + | (df["CCI_20_1h"] > 300.0) + | (df["STOCHk_14_3_3_1h"] > 90.0) + | (df["RSI_14_4h"] > 95.0) + | (df["CCI_20_4h"] > 300.0) + | (df["ROC_9_4h"] < 20.0) + ) # 1h & 4h & 1d up move, 15m still not high enough, 1h & 4h & 1d still not high enough, 1d uptrend & ( (df["RSI_3_1h"] < 80.0)