Skip to content

Commit

Permalink
X5: long_exit_dec: add exit condition.
Browse files Browse the repository at this point in the history
  • Loading branch information
iterativv committed Dec 5, 2024
1 parent 6e2dcb6 commit f391839
Showing 1 changed file with 104 additions and 0 deletions.
104 changes: 104 additions & 0 deletions NostalgiaForInfinityX5.py
Original file line number Diff line number Diff line change
Expand Up @@ -15572,6 +15572,14 @@ def long_exit_dec(
and (last_candle["RSI_3_4h"] < 80.0)
):
return True, f"exit_{mode_name}_d_0_100"
elif (
(last_candle["RSI_3"] > 86.0)
and (last_candle["WILLR_14"] > -14.0)
and (last_candle["RSI_3_1h"] < 50.0)
and (last_candle["STOCHRSIk_14_14_3_3_4h"] > 40.0)
and (isinstance(last_candle["ROC_9_4h"], np.float64) and (last_candle["ROC_9_4h"] > 40.0))
):
return True, f"exit_{mode_name}_d_0_101"
elif 0.02 > current_profit >= 0.01:
if (
(last_candle["WILLR_14"] > -1.0)
Expand Down Expand Up @@ -16381,6 +16389,14 @@ def long_exit_dec(
and (last_candle["RSI_3_4h"] < 80.0)
):
return True, f"exit_{mode_name}_d_1_100"
elif (
(last_candle["RSI_3"] > 84.0)
and (last_candle["WILLR_14"] > -16.0)
and (last_candle["RSI_3_1h"] < 50.0)
and (last_candle["STOCHRSIk_14_14_3_3_4h"] > 40.0)
and (isinstance(last_candle["ROC_9_4h"], np.float64) and (last_candle["ROC_9_4h"] > 40.0))
):
return True, f"exit_{mode_name}_d_1_101"
elif 0.03 > current_profit >= 0.02:
if (
(last_candle["WILLR_14"] > -1.0)
Expand Down Expand Up @@ -17190,6 +17206,14 @@ def long_exit_dec(
and (last_candle["RSI_3_4h"] < 80.0)
):
return True, f"exit_{mode_name}_d_2_100"
elif (
(last_candle["RSI_3"] > 82.0)
and (last_candle["WILLR_14"] > -18.0)
and (last_candle["RSI_3_1h"] < 50.0)
and (last_candle["STOCHRSIk_14_14_3_3_4h"] > 40.0)
and (isinstance(last_candle["ROC_9_4h"], np.float64) and (last_candle["ROC_9_4h"] > 40.0))
):
return True, f"exit_{mode_name}_d_2_101"
elif 0.04 > current_profit >= 0.03:
if (
(last_candle["WILLR_14"] > -1.0)
Expand Down Expand Up @@ -17999,6 +18023,14 @@ def long_exit_dec(
and (last_candle["RSI_3_4h"] < 80.0)
):
return True, f"exit_{mode_name}_d_3_100"
elif (
(last_candle["RSI_3"] > 80.0)
and (last_candle["WILLR_14"] > -20.0)
and (last_candle["RSI_3_1h"] < 50.0)
and (last_candle["STOCHRSIk_14_14_3_3_4h"] > 40.0)
and (isinstance(last_candle["ROC_9_4h"], np.float64) and (last_candle["ROC_9_4h"] > 40.0))
):
return True, f"exit_{mode_name}_d_3_101"
elif 0.05 > current_profit >= 0.04:
if (
(last_candle["WILLR_14"] > -1.0)
Expand Down Expand Up @@ -18808,6 +18840,14 @@ def long_exit_dec(
and (last_candle["RSI_3_4h"] < 80.0)
):
return True, f"exit_{mode_name}_d_4_100"
elif (
(last_candle["RSI_3"] > 78.0)
and (last_candle["WILLR_14"] > -22.0)
and (last_candle["RSI_3_1h"] < 50.0)
and (last_candle["STOCHRSIk_14_14_3_3_4h"] > 40.0)
and (isinstance(last_candle["ROC_9_4h"], np.float64) and (last_candle["ROC_9_4h"] > 40.0))
):
return True, f"exit_{mode_name}_d_4_101"
elif 0.06 > current_profit >= 0.05:
if (
(last_candle["WILLR_14"] > -1.0)
Expand Down Expand Up @@ -19617,6 +19657,14 @@ def long_exit_dec(
and (last_candle["RSI_3_4h"] < 80.0)
):
return True, f"exit_{mode_name}_d_5_100"
elif (
(last_candle["RSI_3"] > 76.0)
and (last_candle["WILLR_14"] > -24.0)
and (last_candle["RSI_3_1h"] < 50.0)
and (last_candle["STOCHRSIk_14_14_3_3_4h"] > 40.0)
and (isinstance(last_candle["ROC_9_4h"], np.float64) and (last_candle["ROC_9_4h"] > 40.0))
):
return True, f"exit_{mode_name}_d_5_101"
elif 0.07 > current_profit >= 0.06:
if (
(last_candle["WILLR_14"] > -1.0)
Expand Down Expand Up @@ -20426,6 +20474,14 @@ def long_exit_dec(
and (last_candle["RSI_3_4h"] < 80.0)
):
return True, f"exit_{mode_name}_d_6_100"
elif (
(last_candle["RSI_3"] > 78.0)
and (last_candle["WILLR_14"] > -22.0)
and (last_candle["RSI_3_1h"] < 50.0)
and (last_candle["STOCHRSIk_14_14_3_3_4h"] > 40.0)
and (isinstance(last_candle["ROC_9_4h"], np.float64) and (last_candle["ROC_9_4h"] > 40.0))
):
return True, f"exit_{mode_name}_d_6_101"
elif 0.08 > current_profit >= 0.07:
if (
(last_candle["WILLR_14"] > -1.0)
Expand Down Expand Up @@ -21235,6 +21291,14 @@ def long_exit_dec(
and (last_candle["RSI_3_4h"] < 80.0)
):
return True, f"exit_{mode_name}_d_7_100"
elif (
(last_candle["RSI_3"] > 80.0)
and (last_candle["WILLR_14"] > -20.0)
and (last_candle["RSI_3_1h"] < 50.0)
and (last_candle["STOCHRSIk_14_14_3_3_4h"] > 40.0)
and (isinstance(last_candle["ROC_9_4h"], np.float64) and (last_candle["ROC_9_4h"] > 40.0))
):
return True, f"exit_{mode_name}_d_7_101"
elif 0.09 > current_profit >= 0.08:
if (
(last_candle["WILLR_14"] > -1.0)
Expand Down Expand Up @@ -22044,6 +22108,14 @@ def long_exit_dec(
and (last_candle["RSI_3_4h"] < 80.0)
):
return True, f"exit_{mode_name}_d_8_100"
elif (
(last_candle["RSI_3"] > 82.0)
and (last_candle["WILLR_14"] > -18.0)
and (last_candle["RSI_3_1h"] < 50.0)
and (last_candle["STOCHRSIk_14_14_3_3_4h"] > 40.0)
and (isinstance(last_candle["ROC_9_4h"], np.float64) and (last_candle["ROC_9_4h"] > 40.0))
):
return True, f"exit_{mode_name}_d_8_101"
elif 0.1 > current_profit >= 0.09:
if (
(last_candle["WILLR_14"] > -1.0)
Expand Down Expand Up @@ -22853,6 +22925,14 @@ def long_exit_dec(
and (last_candle["RSI_3_4h"] < 80.0)
):
return True, f"exit_{mode_name}_d_9_100"
elif (
(last_candle["RSI_3"] > 84.0)
and (last_candle["WILLR_14"] > -16.0)
and (last_candle["RSI_3_1h"] < 50.0)
and (last_candle["STOCHRSIk_14_14_3_3_4h"] > 40.0)
and (isinstance(last_candle["ROC_9_4h"], np.float64) and (last_candle["ROC_9_4h"] > 40.0))
):
return True, f"exit_{mode_name}_d_9_101"
elif 0.12 > current_profit >= 0.1:
if (
(last_candle["WILLR_14"] > -1.0)
Expand Down Expand Up @@ -23662,6 +23742,14 @@ def long_exit_dec(
and (last_candle["RSI_3_4h"] < 80.0)
):
return True, f"exit_{mode_name}_d_10_100"
elif (
(last_candle["RSI_3"] > 86.0)
and (last_candle["WILLR_14"] > -14.0)
and (last_candle["RSI_3_1h"] < 50.0)
and (last_candle["STOCHRSIk_14_14_3_3_4h"] > 40.0)
and (isinstance(last_candle["ROC_9_4h"], np.float64) and (last_candle["ROC_9_4h"] > 40.0))
):
return True, f"exit_{mode_name}_d_10_101"
elif 0.2 > current_profit >= 0.12:
if (
(last_candle["WILLR_14"] > -1.0)
Expand Down Expand Up @@ -24471,6 +24559,14 @@ def long_exit_dec(
and (last_candle["RSI_3_4h"] < 80.0)
):
return True, f"exit_{mode_name}_d_11_100"
elif (
(last_candle["RSI_3"] > 88.0)
and (last_candle["WILLR_14"] > -12.0)
and (last_candle["RSI_3_1h"] < 50.0)
and (last_candle["STOCHRSIk_14_14_3_3_4h"] > 40.0)
and (isinstance(last_candle["ROC_9_4h"], np.float64) and (last_candle["ROC_9_4h"] > 40.0))
):
return True, f"exit_{mode_name}_d_11_101"
elif current_profit >= 0.2:
if (
(last_candle["WILLR_14"] > -1.0)
Expand Down Expand Up @@ -25280,6 +25376,14 @@ def long_exit_dec(
and (last_candle["RSI_3_4h"] < 80.0)
):
return True, f"exit_{mode_name}_d_12_100"
elif (
(last_candle["RSI_3"] > 90.0)
and (last_candle["WILLR_14"] > -10.0)
and (last_candle["RSI_3_1h"] < 50.0)
and (last_candle["STOCHRSIk_14_14_3_3_4h"] > 40.0)
and (isinstance(last_candle["ROC_9_4h"], np.float64) and (last_candle["ROC_9_4h"] > 40.0))
):
return True, f"exit_{mode_name}_d_12_101"

# Here ends exit signal conditions for long_exit_dec

Expand Down

0 comments on commit f391839

Please sign in to comment.