Skip to content

Commit

Permalink
X5: short_exit_dec: add exit condition.
Browse files Browse the repository at this point in the history
  • Loading branch information
iterativv committed Dec 15, 2024
1 parent af22b87 commit a026d3f
Showing 1 changed file with 118 additions and 1 deletion.
119 changes: 118 additions & 1 deletion NostalgiaForInfinityX5.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class NostalgiaForInfinityX5(IStrategy):
INTERFACE_VERSION = 3

def version(self) -> str:
return "v15.1.282"
return "v15.1.283"

stoploss = -0.99

Expand Down Expand Up @@ -34623,6 +34623,15 @@ def short_exit_dec(
and (last_candle["ROC_9_4h"] < -25.0)
):
return True, f"exit_{mode_name}_d_0_105"
elif (
(last_candle["RSI_3"] < 5.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"] < 50.0)
and (last_candle["RSI_14_4h"] < 30.0)
and (last_candle["ROC_9_4h"] < -40.0)
):
return True, f"exit_{mode_name}_d_0_106"
elif 0.02 > current_profit >= 0.01:
if (
(last_candle["WILLR_14"] < -99.0)
Expand Down Expand Up @@ -35474,6 +35483,15 @@ def short_exit_dec(
and (last_candle["ROC_9_4h"] < -25.0)
):
return True, f"exit_{mode_name}_d_1_105"
elif (
(last_candle["RSI_3"] < 28.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"] < 50.0)
and (last_candle["RSI_14_4h"] < 30.0)
and (last_candle["ROC_9_4h"] < -40.0)
):
return True, f"exit_{mode_name}_d_1_106"
elif 0.03 > current_profit >= 0.02:
if (
(last_candle["WILLR_14"] < -99.0)
Expand Down Expand Up @@ -36325,6 +36343,15 @@ def short_exit_dec(
and (last_candle["ROC_9_4h"] < -25.0)
):
return True, f"exit_{mode_name}_d_2_105"
elif (
(last_candle["RSI_3"] < 30.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"] < 50.0)
and (last_candle["RSI_14_4h"] < 30.0)
and (last_candle["ROC_9_4h"] < -40.0)
):
return True, f"exit_{mode_name}_d_2_106"
elif 0.04 > current_profit >= 0.03:
if (
(last_candle["WILLR_14"] < -99.0)
Expand Down Expand Up @@ -37176,6 +37203,15 @@ def short_exit_dec(
and (last_candle["ROC_9_4h"] < -25.0)
):
return True, f"exit_{mode_name}_d_3_105"
elif (
(last_candle["RSI_3"] < 32.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"] < 50.0)
and (last_candle["RSI_14_4h"] < 30.0)
and (last_candle["ROC_9_4h"] < -40.0)
):
return True, f"exit_{mode_name}_d_3_106"
elif 0.05 > current_profit >= 0.04:
if (
(last_candle["WILLR_14"] < -99.0)
Expand Down Expand Up @@ -38027,6 +38063,15 @@ def short_exit_dec(
and (last_candle["ROC_9_4h"] < -25.0)
):
return True, f"exit_{mode_name}_d_4_105"
elif (
(last_candle["RSI_3"] < 34.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"] < 50.0)
and (last_candle["RSI_14_4h"] < 30.0)
and (last_candle["ROC_9_4h"] < -40.0)
):
return True, f"exit_{mode_name}_d_4_106"
elif 0.06 > current_profit >= 0.05:
if (
(last_candle["WILLR_14"] < -99.0)
Expand Down Expand Up @@ -38878,6 +38923,15 @@ def short_exit_dec(
and (last_candle["ROC_9_4h"] < -25.0)
):
return True, f"exit_{mode_name}_d_5_105"
elif (
(last_candle["RSI_3"] < 36.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"] < 50.0)
and (last_candle["RSI_14_4h"] < 30.0)
and (last_candle["ROC_9_4h"] < -40.0)
):
return True, f"exit_{mode_name}_d_5_106"
elif 0.07 > current_profit >= 0.06:
if (
(last_candle["WILLR_14"] < -99.0)
Expand Down Expand Up @@ -39729,6 +39783,15 @@ def short_exit_dec(
and (last_candle["ROC_9_4h"] < -25.0)
):
return True, f"exit_{mode_name}_d_6_105"
elif (
(last_candle["RSI_3"] < 34.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"] < 50.0)
and (last_candle["RSI_14_4h"] < 30.0)
and (last_candle["ROC_9_4h"] < -40.0)
):
return True, f"exit_{mode_name}_d_6_106"
elif 0.08 > current_profit >= 0.07:
if (
(last_candle["WILLR_14"] < -99.0)
Expand Down Expand Up @@ -40580,6 +40643,15 @@ def short_exit_dec(
and (last_candle["ROC_9_4h"] < -25.0)
):
return True, f"exit_{mode_name}_d_7_105"
elif (
(last_candle["RSI_3"] < 32.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"] < 50.0)
and (last_candle["RSI_14_4h"] < 30.0)
and (last_candle["ROC_9_4h"] < -40.0)
):
return True, f"exit_{mode_name}_d_7_106"
elif 0.09 > current_profit >= 0.08:
if (
(last_candle["WILLR_14"] < -99.0)
Expand Down Expand Up @@ -41431,6 +41503,15 @@ def short_exit_dec(
and (last_candle["ROC_9_4h"] < -25.0)
):
return True, f"exit_{mode_name}_d_8_105"
elif (
(last_candle["RSI_3"] < 30.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"] < 50.0)
and (last_candle["RSI_14_4h"] < 30.0)
and (last_candle["ROC_9_4h"] < -40.0)
):
return True, f"exit_{mode_name}_d_8_106"
elif 0.1 > current_profit >= 0.09:
if (
(last_candle["WILLR_14"] < -99.0)
Expand Down Expand Up @@ -42282,6 +42363,15 @@ def short_exit_dec(
and (last_candle["ROC_9_4h"] < -25.0)
):
return True, f"exit_{mode_name}_d_9_105"
elif (
(last_candle["RSI_3"] < 28.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"] < 50.0)
and (last_candle["RSI_14_4h"] < 30.0)
and (last_candle["ROC_9_4h"] < -40.0)
):
return True, f"exit_{mode_name}_d_9_106"
elif 0.12 > current_profit >= 0.1:
if (
(last_candle["WILLR_14"] < -99.0)
Expand Down Expand Up @@ -43133,6 +43223,15 @@ def short_exit_dec(
and (last_candle["ROC_9_4h"] < -25.0)
):
return True, f"exit_{mode_name}_d_10_105"
elif (
(last_candle["RSI_3"] < 26.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"] < 50.0)
and (last_candle["RSI_14_4h"] < 30.0)
and (last_candle["ROC_9_4h"] < -40.0)
):
return True, f"exit_{mode_name}_d_10_106"
elif 0.2 > current_profit >= 0.12:
if (
(last_candle["WILLR_14"] < -99.0)
Expand Down Expand Up @@ -43984,6 +44083,15 @@ def short_exit_dec(
and (last_candle["ROC_9_4h"] < -25.0)
):
return True, f"exit_{mode_name}_d_11_105"
elif (
(last_candle["RSI_3"] < 24.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"] < 50.0)
and (last_candle["RSI_14_4h"] < 30.0)
and (last_candle["ROC_9_4h"] < -40.0)
):
return True, f"exit_{mode_name}_d_11_106"
elif current_profit >= 0.2:
if (
(last_candle["WILLR_14"] < -99.0)
Expand Down Expand Up @@ -44835,6 +44943,15 @@ def short_exit_dec(
and (last_candle["ROC_9_4h"] < -25.0)
):
return True, f"exit_{mode_name}_d_12_105"
elif (
(last_candle["RSI_3"] < 22.0)
and (last_candle["RSI_14"] > 58.0)
and (last_candle["RSI_3_1h"] > 50.0)
and (last_candle["STOCHRSIk_14_14_3_3_1h"] < 50.0)
and (last_candle["RSI_14_4h"] < 30.0)
and (last_candle["ROC_9_4h"] < -40.0)
):
return True, f"exit_{mode_name}_d_12_106"

# Here ends exit signal conditions for short_exit_dec

Expand Down

0 comments on commit a026d3f

Please sign in to comment.