From d652aabeddcb9d41f35eb968611af2800a025da4 Mon Sep 17 00:00:00 2001 From: iterativ Date: Wed, 4 Dec 2024 16:22:56 +0200 Subject: [PATCH] X5: short_exit_dec: add exit condition. --- NostalgiaForInfinityX5.py | 93 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 92 insertions(+), 1 deletion(-) diff --git a/NostalgiaForInfinityX5.py b/NostalgiaForInfinityX5.py index 7b1bf69f22..c58c35535e 100644 --- a/NostalgiaForInfinityX5.py +++ b/NostalgiaForInfinityX5.py @@ -66,7 +66,7 @@ class NostalgiaForInfinityX5(IStrategy): INTERFACE_VERSION = 3 def version(self) -> str: - return "v15.1.259" + return "v15.1.260" stoploss = -0.99 @@ -33148,6 +33148,13 @@ def short_exit_dec( and (isinstance(last_candle["ROC_9_1d"], np.float64) and (last_candle["ROC_9_1d"] < -80.0)) ): return True, f"exit_{mode_name}_d_0_99" + elif ( + (last_candle["RSI_3"] < 1.0) + and (last_candle["RSI_14"] < 22.0) + and (last_candle["RSI_3_15m"] < 30.0) + and (last_candle["RSI_3_4h"] > 20.0) + ): + return True, f"exit_{mode_name}_d_0_100" elif 0.02 > current_profit >= 0.01: if ( (last_candle["WILLR_14"] < -99.0) @@ -33950,6 +33957,13 @@ def short_exit_dec( and (isinstance(last_candle["ROC_9_1d"], np.float64) and (last_candle["ROC_9_1d"] < -80.0)) ): return True, f"exit_{mode_name}_d_1_99" + elif ( + (last_candle["RSI_3"] < 2.0) + and (last_candle["RSI_14"] < 24.0) + and (last_candle["RSI_3_15m"] < 30.0) + and (last_candle["RSI_3_4h"] > 20.0) + ): + return True, f"exit_{mode_name}_d_1_100" elif 0.03 > current_profit >= 0.02: if ( (last_candle["WILLR_14"] < -99.0) @@ -34752,6 +34766,13 @@ def short_exit_dec( and (isinstance(last_candle["ROC_9_1d"], np.float64) and (last_candle["ROC_9_1d"] < -80.0)) ): return True, f"exit_{mode_name}_d_2_99" + elif ( + (last_candle["RSI_3"] < 4.0) + and (last_candle["RSI_14"] < 26.0) + and (last_candle["RSI_3_15m"] < 30.0) + and (last_candle["RSI_3_4h"] > 20.0) + ): + return True, f"exit_{mode_name}_d_2_100" elif 0.04 > current_profit >= 0.03: if ( (last_candle["WILLR_14"] < -99.0) @@ -35554,6 +35575,13 @@ def short_exit_dec( and (isinstance(last_candle["ROC_9_1d"], np.float64) and (last_candle["ROC_9_1d"] < -80.0)) ): return True, f"exit_{mode_name}_d_3_99" + elif ( + (last_candle["RSI_3"] < 6.0) + and (last_candle["RSI_14"] < 28.0) + and (last_candle["RSI_3_15m"] < 30.0) + and (last_candle["RSI_3_4h"] > 20.0) + ): + return True, f"exit_{mode_name}_d_3_100" elif 0.05 > current_profit >= 0.04: if ( (last_candle["WILLR_14"] < -99.0) @@ -36356,6 +36384,13 @@ def short_exit_dec( and (isinstance(last_candle["ROC_9_1d"], np.float64) and (last_candle["ROC_9_1d"] < -80.0)) ): return True, f"exit_{mode_name}_d_4_99" + elif ( + (last_candle["RSI_3"] < 8.0) + and (last_candle["RSI_14"] < 30.0) + and (last_candle["RSI_3_15m"] < 30.0) + and (last_candle["RSI_3_4h"] > 20.0) + ): + return True, f"exit_{mode_name}_d_4_100" elif 0.06 > current_profit >= 0.05: if ( (last_candle["WILLR_14"] < -99.0) @@ -37158,6 +37193,13 @@ def short_exit_dec( and (isinstance(last_candle["ROC_9_1d"], np.float64) and (last_candle["ROC_9_1d"] < -80.0)) ): return True, f"exit_{mode_name}_d_5_99" + elif ( + (last_candle["RSI_3"] < 10.0) + and (last_candle["RSI_14"] < 32.0) + and (last_candle["RSI_3_15m"] < 30.0) + and (last_candle["RSI_3_4h"] > 20.0) + ): + return True, f"exit_{mode_name}_d_5_100" elif 0.07 > current_profit >= 0.06: if ( (last_candle["WILLR_14"] < -99.0) @@ -37960,6 +38002,13 @@ def short_exit_dec( and (isinstance(last_candle["ROC_9_1d"], np.float64) and (last_candle["ROC_9_1d"] < -80.0)) ): return True, f"exit_{mode_name}_d_6_99" + elif ( + (last_candle["RSI_3"] < 8.0) + and (last_candle["RSI_14"] < 30.0) + and (last_candle["RSI_3_15m"] < 30.0) + and (last_candle["RSI_3_4h"] > 20.0) + ): + return True, f"exit_{mode_name}_d_6_100" elif 0.08 > current_profit >= 0.07: if ( (last_candle["WILLR_14"] < -99.0) @@ -38762,6 +38811,13 @@ def short_exit_dec( and (isinstance(last_candle["ROC_9_1d"], np.float64) and (last_candle["ROC_9_1d"] < -80.0)) ): return True, f"exit_{mode_name}_d_7_99" + elif ( + (last_candle["RSI_3"] < 6.0) + and (last_candle["RSI_14"] < 28.0) + and (last_candle["RSI_3_15m"] < 30.0) + and (last_candle["RSI_3_4h"] > 20.0) + ): + return True, f"exit_{mode_name}_d_7_100" elif 0.09 > current_profit >= 0.08: if ( (last_candle["WILLR_14"] < -99.0) @@ -39564,6 +39620,13 @@ def short_exit_dec( and (isinstance(last_candle["ROC_9_1d"], np.float64) and (last_candle["ROC_9_1d"] < -80.0)) ): return True, f"exit_{mode_name}_d_8_99" + elif ( + (last_candle["RSI_3"] < 4.0) + and (last_candle["RSI_14"] < 26.0) + and (last_candle["RSI_3_15m"] < 30.0) + and (last_candle["RSI_3_4h"] > 20.0) + ): + return True, f"exit_{mode_name}_d_8_100" elif 0.1 > current_profit >= 0.09: if ( (last_candle["WILLR_14"] < -99.0) @@ -40366,6 +40429,13 @@ def short_exit_dec( and (isinstance(last_candle["ROC_9_1d"], np.float64) and (last_candle["ROC_9_1d"] < -80.0)) ): return True, f"exit_{mode_name}_d_9_99" + elif ( + (last_candle["RSI_3"] < 2.0) + and (last_candle["RSI_14"] < 24.0) + and (last_candle["RSI_3_15m"] < 30.0) + and (last_candle["RSI_3_4h"] > 20.0) + ): + return True, f"exit_{mode_name}_d_9_100" elif 0.12 > current_profit >= 0.1: if ( (last_candle["WILLR_14"] < -99.0) @@ -41168,6 +41238,13 @@ def short_exit_dec( and (isinstance(last_candle["ROC_9_1d"], np.float64) and (last_candle["ROC_9_1d"] < -80.0)) ): return True, f"exit_{mode_name}_d_10_99" + elif ( + (last_candle["RSI_3"] < 1.0) + and (last_candle["RSI_14"] < 22.0) + and (last_candle["RSI_3_15m"] < 30.0) + and (last_candle["RSI_3_4h"] > 20.0) + ): + return True, f"exit_{mode_name}_d_10_100" elif 0.2 > current_profit >= 0.12: if ( (last_candle["WILLR_14"] < -99.0) @@ -41970,6 +42047,13 @@ def short_exit_dec( and (isinstance(last_candle["ROC_9_1d"], np.float64) and (last_candle["ROC_9_1d"] < -80.0)) ): return True, f"exit_{mode_name}_d_11_99" + elif ( + (last_candle["RSI_3"] < 1.0) + and (last_candle["RSI_14"] < 20.0) + and (last_candle["RSI_3_15m"] < 30.0) + and (last_candle["RSI_3_4h"] > 20.0) + ): + return True, f"exit_{mode_name}_d_11_100" elif current_profit >= 0.2: if ( (last_candle["WILLR_14"] < -99.0) @@ -42772,6 +42856,13 @@ def short_exit_dec( and (isinstance(last_candle["ROC_9_1d"], np.float64) and (last_candle["ROC_9_1d"] < -80.0)) ): return True, f"exit_{mode_name}_d_12_99" + elif ( + (last_candle["RSI_3"] < 1.0) + and (last_candle["RSI_14"] < 18.0) + and (last_candle["RSI_3_15m"] < 30.0) + and (last_candle["RSI_3_4h"] > 20.0) + ): + return True, f"exit_{mode_name}_d_12_100" # Here ends exit signal conditions for short_exit_dec