From 97b5b6621bb145e248297c2b2e22dc7861a5c14e Mon Sep 17 00:00:00 2001 From: iterativ Date: Sun, 22 Dec 2024 19:00:52 +0200 Subject: [PATCH] X5: add global protection rule (Long). --- NostalgiaForInfinityX5.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/NostalgiaForInfinityX5.py b/NostalgiaForInfinityX5.py index 45afde2e40..7fd9960c5c 100644 --- a/NostalgiaForInfinityX5.py +++ b/NostalgiaForInfinityX5.py @@ -67,7 +67,7 @@ class NostalgiaForInfinityX5(IStrategy): INTERFACE_VERSION = 3 def version(self) -> str: - return "v15.1.300" + return "v15.1.301" stoploss = -0.99 @@ -4969,6 +4969,24 @@ def populate_indicators(self, df: DataFrame, metadata: dict) -> DataFrame: | (df["AROONU_14_1d"] < 25.0) | (df["STOCHRSIk_14_14_3_3_1d"] < 20.0) ) + # 15m & 1h & 4h & 1d down move, 15m & 1h & 4h still not low enough, 1d still not low enough & downtrend + & ( + (df["RSI_3_15m"] > 5.0) + | (df["RSI_3_1h"] > 25.0) + | (df["RSI_3_4h"] > 25.0) + | (df["RSI_3_1d"] > 25.0) + | (df["RSI_14_15m"] < 10.0) + | (df["CCI_20_15m"] < -500.0) + | (df["RSI_14_1h"] < 10.0) + | (df["CMF_20_1h"] > -0.20) + | (df["CCI_20_1h"] < -250.0) + | (df["RSI_14_4h"] < 20.0) + | (df["CCI_20_4h"] < -150.0) + | (df["STOCHRSIk_14_14_3_3_4h"] < 30.0) + | (df["RSI_14_1d"] < 20.0) + | (df["AROONU_14_1d"] < 25.0) + | (df["ROC_9_1d"] > -10.0) + ) # 15m & 1h & 4h down move, 15m & 1h & 4h & 1d stil not low enough & ( (df["RSI_3_15m"] > 5.0)