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 Jan 7, 2025
1 parent e07fee5 commit 54034d3
Showing 1 changed file with 92 additions and 1 deletion.
93 changes: 92 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.317"
return "v15.1.318"

stoploss = -0.99

Expand Down Expand Up @@ -36835,6 +36835,13 @@ def short_exit_dec(
and (isinstance(last_candle["ROC_9_1d"], np.float64) and (last_candle["ROC_9_1d"] < -50.0))
):
return True, f"exit_{mode_name}_d_0_109"
elif (
(last_candle["RSI_3"] < 5.0)
and (last_candle["RSI_3_4h"] > 35.0)
and (last_candle["STOCHRSIk_14_14_3_3_4h"] < 50.0)
and (last_candle["ROC_9_4h"] < -25.0)
):
return True, f"exit_{mode_name}_d_0_110"
elif 0.02 > current_profit >= 0.01:
if (
(last_candle["WILLR_14"] < -99.0)
Expand Down Expand Up @@ -37718,6 +37725,13 @@ def short_exit_dec(
and (isinstance(last_candle["ROC_9_1d"], np.float64) and (last_candle["ROC_9_1d"] < -50.0))
):
return True, f"exit_{mode_name}_d_1_109"
elif (
(last_candle["RSI_3"] < 28.0)
and (last_candle["RSI_3_4h"] > 35.0)
and (last_candle["STOCHRSIk_14_14_3_3_4h"] < 50.0)
and (last_candle["ROC_9_4h"] < -25.0)
):
return True, f"exit_{mode_name}_d_1_110"
elif 0.03 > current_profit >= 0.02:
if (
(last_candle["WILLR_14"] < -99.0)
Expand Down Expand Up @@ -38601,6 +38615,13 @@ def short_exit_dec(
and (isinstance(last_candle["ROC_9_1d"], np.float64) and (last_candle["ROC_9_1d"] < -50.0))
):
return True, f"exit_{mode_name}_d_2_109"
elif (
(last_candle["RSI_3"] < 30.0)
and (last_candle["RSI_3_4h"] > 35.0)
and (last_candle["STOCHRSIk_14_14_3_3_4h"] < 50.0)
and (last_candle["ROC_9_4h"] < -25.0)
):
return True, f"exit_{mode_name}_d_2_110"
elif 0.04 > current_profit >= 0.03:
if (
(last_candle["WILLR_14"] < -99.0)
Expand Down Expand Up @@ -39484,6 +39505,13 @@ def short_exit_dec(
and (isinstance(last_candle["ROC_9_1d"], np.float64) and (last_candle["ROC_9_1d"] < -50.0))
):
return True, f"exit_{mode_name}_d_3_109"
elif (
(last_candle["RSI_3"] < 32.0)
and (last_candle["RSI_3_4h"] > 35.0)
and (last_candle["STOCHRSIk_14_14_3_3_4h"] < 50.0)
and (last_candle["ROC_9_4h"] < -25.0)
):
return True, f"exit_{mode_name}_d_3_110"
elif 0.05 > current_profit >= 0.04:
if (
(last_candle["WILLR_14"] < -99.0)
Expand Down Expand Up @@ -40367,6 +40395,13 @@ def short_exit_dec(
and (isinstance(last_candle["ROC_9_1d"], np.float64) and (last_candle["ROC_9_1d"] < -50.0))
):
return True, f"exit_{mode_name}_d_4_109"
elif (
(last_candle["RSI_3"] < 34.0)
and (last_candle["RSI_3_4h"] > 35.0)
and (last_candle["STOCHRSIk_14_14_3_3_4h"] < 50.0)
and (last_candle["ROC_9_4h"] < -25.0)
):
return True, f"exit_{mode_name}_d_4_110"
elif 0.06 > current_profit >= 0.05:
if (
(last_candle["WILLR_14"] < -99.0)
Expand Down Expand Up @@ -41250,6 +41285,13 @@ def short_exit_dec(
and (isinstance(last_candle["ROC_9_1d"], np.float64) and (last_candle["ROC_9_1d"] < -50.0))
):
return True, f"exit_{mode_name}_d_5_109"
elif (
(last_candle["RSI_3"] < 36.0)
and (last_candle["RSI_3_4h"] > 35.0)
and (last_candle["STOCHRSIk_14_14_3_3_4h"] < 50.0)
and (last_candle["ROC_9_4h"] < -25.0)
):
return True, f"exit_{mode_name}_d_5_110"
elif 0.07 > current_profit >= 0.06:
if (
(last_candle["WILLR_14"] < -99.0)
Expand Down Expand Up @@ -42133,6 +42175,13 @@ def short_exit_dec(
and (isinstance(last_candle["ROC_9_1d"], np.float64) and (last_candle["ROC_9_1d"] < -50.0))
):
return True, f"exit_{mode_name}_d_6_109"
elif (
(last_candle["RSI_3"] < 34.0)
and (last_candle["RSI_3_4h"] > 35.0)
and (last_candle["STOCHRSIk_14_14_3_3_4h"] < 50.0)
and (last_candle["ROC_9_4h"] < -25.0)
):
return True, f"exit_{mode_name}_d_6_110"
elif 0.08 > current_profit >= 0.07:
if (
(last_candle["WILLR_14"] < -99.0)
Expand Down Expand Up @@ -43016,6 +43065,13 @@ def short_exit_dec(
and (isinstance(last_candle["ROC_9_1d"], np.float64) and (last_candle["ROC_9_1d"] < -50.0))
):
return True, f"exit_{mode_name}_d_7_109"
elif (
(last_candle["RSI_3"] < 32.0)
and (last_candle["RSI_3_4h"] > 35.0)
and (last_candle["STOCHRSIk_14_14_3_3_4h"] < 50.0)
and (last_candle["ROC_9_4h"] < -25.0)
):
return True, f"exit_{mode_name}_d_7_110"
elif 0.09 > current_profit >= 0.08:
if (
(last_candle["WILLR_14"] < -99.0)
Expand Down Expand Up @@ -43899,6 +43955,13 @@ def short_exit_dec(
and (isinstance(last_candle["ROC_9_1d"], np.float64) and (last_candle["ROC_9_1d"] < -50.0))
):
return True, f"exit_{mode_name}_d_8_109"
elif (
(last_candle["RSI_3"] < 30.0)
and (last_candle["RSI_3_4h"] > 35.0)
and (last_candle["STOCHRSIk_14_14_3_3_4h"] < 50.0)
and (last_candle["ROC_9_4h"] < -25.0)
):
return True, f"exit_{mode_name}_d_8_110"
elif 0.1 > current_profit >= 0.09:
if (
(last_candle["WILLR_14"] < -99.0)
Expand Down Expand Up @@ -44782,6 +44845,13 @@ def short_exit_dec(
and (isinstance(last_candle["ROC_9_1d"], np.float64) and (last_candle["ROC_9_1d"] < -50.0))
):
return True, f"exit_{mode_name}_d_9_109"
elif (
(last_candle["RSI_3"] < 28.0)
and (last_candle["RSI_3_4h"] > 35.0)
and (last_candle["STOCHRSIk_14_14_3_3_4h"] < 50.0)
and (last_candle["ROC_9_4h"] < -25.0)
):
return True, f"exit_{mode_name}_d_9_110"
elif 0.12 > current_profit >= 0.1:
if (
(last_candle["WILLR_14"] < -99.0)
Expand Down Expand Up @@ -45665,6 +45735,13 @@ def short_exit_dec(
and (isinstance(last_candle["ROC_9_1d"], np.float64) and (last_candle["ROC_9_1d"] < -50.0))
):
return True, f"exit_{mode_name}_d_10_109"
elif (
(last_candle["RSI_3"] < 26.0)
and (last_candle["RSI_3_4h"] > 35.0)
and (last_candle["STOCHRSIk_14_14_3_3_4h"] < 50.0)
and (last_candle["ROC_9_4h"] < -25.0)
):
return True, f"exit_{mode_name}_d_10_110"
elif 0.2 > current_profit >= 0.12:
if (
(last_candle["WILLR_14"] < -99.0)
Expand Down Expand Up @@ -46548,6 +46625,13 @@ def short_exit_dec(
and (isinstance(last_candle["ROC_9_1d"], np.float64) and (last_candle["ROC_9_1d"] < -50.0))
):
return True, f"exit_{mode_name}_d_11_109"
elif (
(last_candle["RSI_3"] < 24.0)
and (last_candle["RSI_3_4h"] > 35.0)
and (last_candle["STOCHRSIk_14_14_3_3_4h"] < 50.0)
and (last_candle["ROC_9_4h"] < -25.0)
):
return True, f"exit_{mode_name}_d_11_110"
elif current_profit >= 0.2:
if (
(last_candle["WILLR_14"] < -99.0)
Expand Down Expand Up @@ -47431,6 +47515,13 @@ def short_exit_dec(
and (isinstance(last_candle["ROC_9_1d"], np.float64) and (last_candle["ROC_9_1d"] < -50.0))
):
return True, f"exit_{mode_name}_d_12_109"
elif (
(last_candle["RSI_3"] < 22.0)
and (last_candle["RSI_3_4h"] > 35.0)
and (last_candle["STOCHRSIk_14_14_3_3_4h"] < 50.0)
and (last_candle["ROC_9_4h"] < -25.0)
):
return True, f"exit_{mode_name}_d_12_110"

# Here ends exit signal conditions for short_exit_dec

Expand Down

0 comments on commit 54034d3

Please sign in to comment.