From c95a157847e793d17f0a3069de8202839aa7b33d Mon Sep 17 00:00:00 2001 From: iterativ Date: Wed, 28 Feb 2024 15:14:18 +0200 Subject: [PATCH] X4: add global buy protection rule. --- NostalgiaForInfinityX4.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/NostalgiaForInfinityX4.py b/NostalgiaForInfinityX4.py index cc46d3c8f3..bc5d55c7c7 100644 --- a/NostalgiaForInfinityX4.py +++ b/NostalgiaForInfinityX4.py @@ -68,7 +68,7 @@ class NostalgiaForInfinityX4(IStrategy): INTERFACE_VERSION = 3 def version(self) -> str: - return "v14.1.259" + return "v14.1.260" stoploss = -0.99 @@ -18957,6 +18957,17 @@ def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame | (dataframe["close"] < dataframe["res_hlevel_4h"]) | (dataframe["close"] < dataframe["res_hlevel_1d"]) ) + & ( + (dataframe["change_pct_4h"] < 0.05) + | (dataframe["change_pct_1h"] > -0.05) + | (dataframe["cti_20_4h"] < 0.8) + | (dataframe["rsi_14_4h"] < 70.0) + | (dataframe["r_480_1h"] < -30.0) + | (dataframe["r_480_4h"] < -10.0) + | (dataframe["close"] < dataframe["res_hlevel_4h"]) + | (dataframe["close"] < dataframe["res_hlevel_1d"]) + | (dataframe["hl_pct_change_6_1d"] < 0.7) + ) ) dataframe["global_protections_long_dump"] = (