From 9daa27c2d2e84c3a6f9401a50ee16053ff202bdc Mon Sep 17 00:00:00 2001 From: iterativ Date: Sun, 15 Dec 2024 17:37:21 +0200 Subject: [PATCH] X5: long_exit_dec: add exit condition. --- NostalgiaForInfinityX5.py | 104 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) diff --git a/NostalgiaForInfinityX5.py b/NostalgiaForInfinityX5.py index 5c9879506e..752e01ca82 100644 --- a/NostalgiaForInfinityX5.py +++ b/NostalgiaForInfinityX5.py @@ -16357,6 +16357,14 @@ def long_exit_dec( and (last_candle["ROC_9_4h"] > 40.0) ): return True, f"exit_{mode_name}_d_0_106" + elif ( + (last_candle["RSI_3"] > 95.0) + and (last_candle["RSI_14"] < 46.0) + and (last_candle["RSI_3_1h"] < 50.0) + and (last_candle["STOCHRSIk_14_14_3_3_1h"] > 70.0) + and (last_candle["RSI_14_4h"] > 50.0) + ): + return True, f"exit_{mode_name}_d_0_107" elif 0.02 > current_profit >= 0.01: if ( (last_candle["WILLR_14"] > -1.0) @@ -17217,6 +17225,14 @@ def long_exit_dec( and (last_candle["ROC_9_4h"] > 40.0) ): return True, f"exit_{mode_name}_d_1_106" + elif ( + (last_candle["RSI_3"] > 74.0) + and (last_candle["RSI_14"] < 48.0) + and (last_candle["RSI_3_1h"] < 50.0) + and (last_candle["STOCHRSIk_14_14_3_3_1h"] > 70.0) + and (last_candle["RSI_14_4h"] > 50.0) + ): + return True, f"exit_{mode_name}_d_1_107" elif 0.03 > current_profit >= 0.02: if ( (last_candle["WILLR_14"] > -1.0) @@ -18077,6 +18093,14 @@ def long_exit_dec( and (last_candle["ROC_9_4h"] > 40.0) ): return True, f"exit_{mode_name}_d_2_106" + elif ( + (last_candle["RSI_3"] > 72.0) + and (last_candle["RSI_14"] < 50.0) + and (last_candle["RSI_3_1h"] < 50.0) + and (last_candle["STOCHRSIk_14_14_3_3_1h"] > 70.0) + and (last_candle["RSI_14_4h"] > 50.0) + ): + return True, f"exit_{mode_name}_d_2_107" elif 0.04 > current_profit >= 0.03: if ( (last_candle["WILLR_14"] > -1.0) @@ -18937,6 +18961,14 @@ def long_exit_dec( and (last_candle["ROC_9_4h"] > 40.0) ): return True, f"exit_{mode_name}_d_3_106" + elif ( + (last_candle["RSI_3"] > 70.0) + and (last_candle["RSI_14"] < 52.0) + and (last_candle["RSI_3_1h"] < 50.0) + and (last_candle["STOCHRSIk_14_14_3_3_1h"] > 70.0) + and (last_candle["RSI_14_4h"] > 50.0) + ): + return True, f"exit_{mode_name}_d_3_107" elif 0.05 > current_profit >= 0.04: if ( (last_candle["WILLR_14"] > -1.0) @@ -19797,6 +19829,14 @@ def long_exit_dec( and (last_candle["ROC_9_4h"] > 40.0) ): return True, f"exit_{mode_name}_d_4_106" + elif ( + (last_candle["RSI_3"] > 68.0) + and (last_candle["RSI_14"] < 54.0) + and (last_candle["RSI_3_1h"] < 50.0) + and (last_candle["STOCHRSIk_14_14_3_3_1h"] > 70.0) + and (last_candle["RSI_14_4h"] > 50.0) + ): + return True, f"exit_{mode_name}_d_4_107" elif 0.06 > current_profit >= 0.05: if ( (last_candle["WILLR_14"] > -1.0) @@ -20657,6 +20697,14 @@ def long_exit_dec( and (last_candle["ROC_9_4h"] > 40.0) ): return True, f"exit_{mode_name}_d_5_106" + elif ( + (last_candle["RSI_3"] > 66.0) + and (last_candle["RSI_14"] < 56.0) + and (last_candle["RSI_3_1h"] < 50.0) + and (last_candle["STOCHRSIk_14_14_3_3_1h"] > 70.0) + and (last_candle["RSI_14_4h"] > 50.0) + ): + return True, f"exit_{mode_name}_d_5_107" elif 0.07 > current_profit >= 0.06: if ( (last_candle["WILLR_14"] > -1.0) @@ -21517,6 +21565,14 @@ def long_exit_dec( and (last_candle["ROC_9_4h"] > 40.0) ): return True, f"exit_{mode_name}_d_6_106" + elif ( + (last_candle["RSI_3"] > 68.0) + and (last_candle["RSI_14"] < 54.0) + and (last_candle["RSI_3_1h"] < 50.0) + and (last_candle["STOCHRSIk_14_14_3_3_1h"] > 70.0) + and (last_candle["RSI_14_4h"] > 50.0) + ): + return True, f"exit_{mode_name}_d_6_107" elif 0.08 > current_profit >= 0.07: if ( (last_candle["WILLR_14"] > -1.0) @@ -22377,6 +22433,14 @@ def long_exit_dec( and (last_candle["ROC_9_4h"] > 40.0) ): return True, f"exit_{mode_name}_d_7_106" + elif ( + (last_candle["RSI_3"] > 70.0) + and (last_candle["RSI_14"] < 52.0) + and (last_candle["RSI_3_1h"] < 50.0) + and (last_candle["STOCHRSIk_14_14_3_3_1h"] > 70.0) + and (last_candle["RSI_14_4h"] > 50.0) + ): + return True, f"exit_{mode_name}_d_7_107" elif 0.09 > current_profit >= 0.08: if ( (last_candle["WILLR_14"] > -1.0) @@ -23237,6 +23301,14 @@ def long_exit_dec( and (last_candle["ROC_9_4h"] > 40.0) ): return True, f"exit_{mode_name}_d_8_106" + elif ( + (last_candle["RSI_3"] > 72.0) + and (last_candle["RSI_14"] < 50.0) + and (last_candle["RSI_3_1h"] < 50.0) + and (last_candle["STOCHRSIk_14_14_3_3_1h"] > 70.0) + and (last_candle["RSI_14_4h"] > 50.0) + ): + return True, f"exit_{mode_name}_d_8_107" elif 0.1 > current_profit >= 0.09: if ( (last_candle["WILLR_14"] > -1.0) @@ -24097,6 +24169,14 @@ def long_exit_dec( and (last_candle["ROC_9_4h"] > 40.0) ): return True, f"exit_{mode_name}_d_9_106" + elif ( + (last_candle["RSI_3"] > 74.0) + and (last_candle["RSI_14"] < 48.0) + and (last_candle["RSI_3_1h"] < 50.0) + and (last_candle["STOCHRSIk_14_14_3_3_1h"] > 70.0) + and (last_candle["RSI_14_4h"] > 50.0) + ): + return True, f"exit_{mode_name}_d_9_107" elif 0.12 > current_profit >= 0.1: if ( (last_candle["WILLR_14"] > -1.0) @@ -24957,6 +25037,14 @@ def long_exit_dec( and (last_candle["ROC_9_4h"] > 40.0) ): return True, f"exit_{mode_name}_d_10_106" + elif ( + (last_candle["RSI_3"] > 76.0) + and (last_candle["RSI_14"] < 46.0) + and (last_candle["RSI_3_1h"] < 50.0) + and (last_candle["STOCHRSIk_14_14_3_3_1h"] > 70.0) + and (last_candle["RSI_14_4h"] > 50.0) + ): + return True, f"exit_{mode_name}_d_10_107" elif 0.2 > current_profit >= 0.12: if ( (last_candle["WILLR_14"] > -1.0) @@ -25817,6 +25905,14 @@ def long_exit_dec( and (last_candle["ROC_9_4h"] > 40.0) ): return True, f"exit_{mode_name}_d_11_106" + elif ( + (last_candle["RSI_3"] > 78.0) + and (last_candle["RSI_14"] < 44.0) + and (last_candle["RSI_3_1h"] < 50.0) + and (last_candle["STOCHRSIk_14_14_3_3_1h"] > 70.0) + and (last_candle["RSI_14_4h"] > 50.0) + ): + return True, f"exit_{mode_name}_d_11_107" elif current_profit >= 0.2: if ( (last_candle["WILLR_14"] > -1.0) @@ -26677,6 +26773,14 @@ def long_exit_dec( and (last_candle["ROC_9_4h"] > 40.0) ): return True, f"exit_{mode_name}_d_12_106" + elif ( + (last_candle["RSI_3"] > 80.0) + and (last_candle["RSI_14"] < 42.0) + and (last_candle["RSI_3_1h"] < 50.0) + and (last_candle["STOCHRSIk_14_14_3_3_1h"] > 70.0) + and (last_candle["RSI_14_4h"] > 50.0) + ): + return True, f"exit_{mode_name}_d_12_107" # Here ends exit signal conditions for long_exit_dec