From 08a429fa97927ff8eda95bef979688af1f550c27 Mon Sep 17 00:00:00 2001 From: iterativ Date: Wed, 29 Nov 2023 17:30:49 +0200 Subject: [PATCH] X4: add global buy protection rule. --- NostalgiaForInfinityX4.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/NostalgiaForInfinityX4.py b/NostalgiaForInfinityX4.py index f1b8e44637..030086531d 100644 --- a/NostalgiaForInfinityX4.py +++ b/NostalgiaForInfinityX4.py @@ -67,7 +67,7 @@ class NostalgiaForInfinityX4(IStrategy): INTERFACE_VERSION = 3 def version(self) -> str: - return "v14.0.530" + return "v14.0.531" # ROI table: minimal_roi = { @@ -9969,6 +9969,19 @@ def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame | (dataframe["close"] > dataframe["sup_level_1h"]) | (dataframe["close"] > dataframe["sup_level_4h"]) ) + # 1h & 4h & 1d downtrend, 1h & 1d downmove, 5m & 15m still high, 5h low, 1h & 4h downtrend + & ( + (dataframe["not_downtrend_1h"]) + | (dataframe["not_downtrend_4h"]) + | (dataframe["not_downtrend_1d"]) + | (dataframe["rsi_3_1h"] > 30.0) + | (dataframe["rsi_3_1d"] > 30.0) + | (dataframe["rsi_14"] < 30.0) + | (dataframe["rsi_14_15m"] < 30.0) + | (dataframe["r_480_4h"] > -75.0) + | (dataframe["ema_200_dec_48_1h"] == False) + | (dataframe["ema_200_dec_24_4h"] == False) + ) ) # Global protections