From b5d8a8f15b40091abb32923666d48819f3ca1694 Mon Sep 17 00:00:00 2001 From: iterativ Date: Thu, 19 Oct 2023 19:30:43 +0300 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 90eb397f01..e34cf27654 100644 --- a/NostalgiaForInfinityX4.py +++ b/NostalgiaForInfinityX4.py @@ -65,7 +65,7 @@ class NostalgiaForInfinityX4(IStrategy): INTERFACE_VERSION = 3 def version(self) -> str: - return "v14.0.360" + return "v14.0.361" # ROI table: minimal_roi = { @@ -6883,6 +6883,19 @@ def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame | (dataframe['cti_20_1d'] < -0.5) | (dataframe['rsi_14_1d'] < 46.0) ) + # 1h & 4h & 1d downtrend, 15m & 4h & 1d downmove, 1h & 4h & 1d downtrend + & + ( + (dataframe['not_downtrend_1h']) + | (dataframe['not_downtrend_4h']) + | (dataframe['not_downtrend_1d']) + | (dataframe['rsi_3_15m'] > 26.0) + | (dataframe['rsi_3_4h'] > 30.0) + | (dataframe['rsi_3_1d'] > 30.0) + | (dataframe['ema_200_dec_48_1h'] == False) + | (dataframe['ema_200_dec_24_4h'] == False) + | (dataframe['ema_200_dec_4_1d'] == False) + ) ) tok = time.perf_counter()