Skip to content

Commit 8a86fa6

Browse files
committed
X6: short_exit_dec: add exit condition.
1 parent b9d6e2d commit 8a86fa6

File tree

1 file changed

+92
-1
lines changed

1 file changed

+92
-1
lines changed

NostalgiaForInfinityX6.py

Lines changed: 92 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class NostalgiaForInfinityX6(IStrategy):
6969
INTERFACE_VERSION = 3
7070

7171
def version(self) -> str:
72-
return "v16.5.143"
72+
return "v16.5.144"
7373

7474
stoploss = -0.99
7575

@@ -38609,6 +38609,13 @@ def short_exit_dec(
3860938609
and (last_candle["CCI_20_change_pct_1h"] > 0.0)
3861038610
):
3861138611
return True, f"exit_{mode_name}_d_0_130"
38612+
elif (
38613+
(last_candle["RSI_14"] > 64.0)
38614+
and (last_candle["RSI_3_1h"] > 80.0)
38615+
and (last_candle["RSI_3_4h"] > 70.0)
38616+
and (last_candle["STOCHRSIk_14_14_3_3_4h"] < 50.0)
38617+
):
38618+
return True, f"exit_{mode_name}_d_0_131"
3861238619
elif 0.02 > current_profit >= 0.01:
3861338620
if (
3861438621
(last_candle["WILLR_14"] < -99.0)
@@ -39648,6 +39655,13 @@ def short_exit_dec(
3964839655
and (last_candle["CCI_20_change_pct_1h"] > 0.0)
3964939656
):
3965039657
return True, f"exit_{mode_name}_d_1_130"
39658+
elif (
39659+
(last_candle["RSI_14"] > 62.0)
39660+
and (last_candle["RSI_3_1h"] > 80.0)
39661+
and (last_candle["RSI_3_4h"] > 70.0)
39662+
and (last_candle["STOCHRSIk_14_14_3_3_4h"] < 50.0)
39663+
):
39664+
return True, f"exit_{mode_name}_d_1_131"
3965139665
elif 0.03 > current_profit >= 0.02:
3965239666
if (
3965339667
(last_candle["WILLR_14"] < -99.0)
@@ -40687,6 +40701,13 @@ def short_exit_dec(
4068740701
and (last_candle["CCI_20_change_pct_1h"] > 0.0)
4068840702
):
4068940703
return True, f"exit_{mode_name}_d_2_130"
40704+
elif (
40705+
(last_candle["RSI_14"] > 60.0)
40706+
and (last_candle["RSI_3_1h"] > 80.0)
40707+
and (last_candle["RSI_3_4h"] > 70.0)
40708+
and (last_candle["STOCHRSIk_14_14_3_3_4h"] < 50.0)
40709+
):
40710+
return True, f"exit_{mode_name}_d_2_131"
4069040711
elif 0.04 > current_profit >= 0.03:
4069140712
if (
4069240713
(last_candle["WILLR_14"] < -99.0)
@@ -41726,6 +41747,13 @@ def short_exit_dec(
4172641747
and (last_candle["CCI_20_change_pct_1h"] > 0.0)
4172741748
):
4172841749
return True, f"exit_{mode_name}_d_3_130"
41750+
elif (
41751+
(last_candle["RSI_14"] > 58.0)
41752+
and (last_candle["RSI_3_1h"] > 80.0)
41753+
and (last_candle["RSI_3_4h"] > 70.0)
41754+
and (last_candle["STOCHRSIk_14_14_3_3_4h"] < 50.0)
41755+
):
41756+
return True, f"exit_{mode_name}_d_3_131"
4172941757
elif 0.05 > current_profit >= 0.04:
4173041758
if (
4173141759
(last_candle["WILLR_14"] < -99.0)
@@ -42765,6 +42793,13 @@ def short_exit_dec(
4276542793
and (last_candle["CCI_20_change_pct_1h"] > 0.0)
4276642794
):
4276742795
return True, f"exit_{mode_name}_d_4_130"
42796+
elif (
42797+
(last_candle["RSI_14"] > 56.0)
42798+
and (last_candle["RSI_3_1h"] > 80.0)
42799+
and (last_candle["RSI_3_4h"] > 70.0)
42800+
and (last_candle["STOCHRSIk_14_14_3_3_4h"] < 50.0)
42801+
):
42802+
return True, f"exit_{mode_name}_d_4_131"
4276842803
elif 0.06 > current_profit >= 0.05:
4276942804
if (
4277042805
(last_candle["WILLR_14"] < -99.0)
@@ -43804,6 +43839,13 @@ def short_exit_dec(
4380443839
and (last_candle["CCI_20_change_pct_1h"] > 0.0)
4380543840
):
4380643841
return True, f"exit_{mode_name}_d_5_130"
43842+
elif (
43843+
(last_candle["RSI_14"] > 54.0)
43844+
and (last_candle["RSI_3_1h"] > 80.0)
43845+
and (last_candle["RSI_3_4h"] > 70.0)
43846+
and (last_candle["STOCHRSIk_14_14_3_3_4h"] < 50.0)
43847+
):
43848+
return True, f"exit_{mode_name}_d_5_131"
4380743849
elif 0.07 > current_profit >= 0.06:
4380843850
if (
4380943851
(last_candle["WILLR_14"] < -99.0)
@@ -44843,6 +44885,13 @@ def short_exit_dec(
4484344885
and (last_candle["CCI_20_change_pct_1h"] > 0.0)
4484444886
):
4484544887
return True, f"exit_{mode_name}_d_6_130"
44888+
elif (
44889+
(last_candle["RSI_14"] > 56.0)
44890+
and (last_candle["RSI_3_1h"] > 80.0)
44891+
and (last_candle["RSI_3_4h"] > 70.0)
44892+
and (last_candle["STOCHRSIk_14_14_3_3_4h"] < 50.0)
44893+
):
44894+
return True, f"exit_{mode_name}_d_6_131"
4484644895
elif 0.08 > current_profit >= 0.07:
4484744896
if (
4484844897
(last_candle["WILLR_14"] < -99.0)
@@ -45882,6 +45931,13 @@ def short_exit_dec(
4588245931
and (last_candle["CCI_20_change_pct_1h"] > 0.0)
4588345932
):
4588445933
return True, f"exit_{mode_name}_d_7_130"
45934+
elif (
45935+
(last_candle["RSI_14"] > 58.0)
45936+
and (last_candle["RSI_3_1h"] > 80.0)
45937+
and (last_candle["RSI_3_4h"] > 70.0)
45938+
and (last_candle["STOCHRSIk_14_14_3_3_4h"] < 50.0)
45939+
):
45940+
return True, f"exit_{mode_name}_d_7_131"
4588545941
elif 0.09 > current_profit >= 0.08:
4588645942
if (
4588745943
(last_candle["WILLR_14"] < -99.0)
@@ -46921,6 +46977,13 @@ def short_exit_dec(
4692146977
and (last_candle["CCI_20_change_pct_1h"] > 0.0)
4692246978
):
4692346979
return True, f"exit_{mode_name}_d_8_130"
46980+
elif (
46981+
(last_candle["RSI_14"] > 60.0)
46982+
and (last_candle["RSI_3_1h"] > 80.0)
46983+
and (last_candle["RSI_3_4h"] > 70.0)
46984+
and (last_candle["STOCHRSIk_14_14_3_3_4h"] < 50.0)
46985+
):
46986+
return True, f"exit_{mode_name}_d_8_131"
4692446987
elif 0.1 > current_profit >= 0.09:
4692546988
if (
4692646989
(last_candle["WILLR_14"] < -99.0)
@@ -47960,6 +48023,13 @@ def short_exit_dec(
4796048023
and (last_candle["CCI_20_change_pct_1h"] > 0.0)
4796148024
):
4796248025
return True, f"exit_{mode_name}_d_9_130"
48026+
elif (
48027+
(last_candle["RSI_14"] > 62.0)
48028+
and (last_candle["RSI_3_1h"] > 80.0)
48029+
and (last_candle["RSI_3_4h"] > 70.0)
48030+
and (last_candle["STOCHRSIk_14_14_3_3_4h"] < 50.0)
48031+
):
48032+
return True, f"exit_{mode_name}_d_9_131"
4796348033
elif 0.12 > current_profit >= 0.1:
4796448034
if (
4796548035
(last_candle["WILLR_14"] < -99.0)
@@ -48999,6 +49069,13 @@ def short_exit_dec(
4899949069
and (last_candle["CCI_20_change_pct_1h"] > 0.0)
4900049070
):
4900149071
return True, f"exit_{mode_name}_d_10_130"
49072+
elif (
49073+
(last_candle["RSI_14"] > 64.0)
49074+
and (last_candle["RSI_3_1h"] > 80.0)
49075+
and (last_candle["RSI_3_4h"] > 70.0)
49076+
and (last_candle["STOCHRSIk_14_14_3_3_4h"] < 50.0)
49077+
):
49078+
return True, f"exit_{mode_name}_d_10_131"
4900249079
elif 0.2 > current_profit >= 0.12:
4900349080
if (
4900449081
(last_candle["WILLR_14"] < -99.0)
@@ -50038,6 +50115,13 @@ def short_exit_dec(
5003850115
and (last_candle["CCI_20_change_pct_1h"] > 0.0)
5003950116
):
5004050117
return True, f"exit_{mode_name}_d_11_130"
50118+
elif (
50119+
(last_candle["RSI_14"] > 66.0)
50120+
and (last_candle["RSI_3_1h"] > 80.0)
50121+
and (last_candle["RSI_3_4h"] > 70.0)
50122+
and (last_candle["STOCHRSIk_14_14_3_3_4h"] < 50.0)
50123+
):
50124+
return True, f"exit_{mode_name}_d_11_131"
5004150125
elif current_profit >= 0.2:
5004250126
if (
5004350127
(last_candle["WILLR_14"] < -99.0)
@@ -51077,6 +51161,13 @@ def short_exit_dec(
5107751161
and (last_candle["CCI_20_change_pct_1h"] > 0.0)
5107851162
):
5107951163
return True, f"exit_{mode_name}_d_12_130"
51164+
elif (
51165+
(last_candle["RSI_14"] > 68.0)
51166+
and (last_candle["RSI_3_1h"] > 80.0)
51167+
and (last_candle["RSI_3_4h"] > 70.0)
51168+
and (last_candle["STOCHRSIk_14_14_3_3_4h"] < 50.0)
51169+
):
51170+
return True, f"exit_{mode_name}_d_12_131"
5108051171

5108151172
# Here ends exit signal conditions for short_exit_dec
5108251173

0 commit comments

Comments
 (0)