Skip to content

Commit 0dc0f75

Browse files
committed
X5: short_exit_dec: add exit condition.
1 parent 34570d2 commit 0dc0f75

File tree

1 file changed

+92
-1
lines changed

1 file changed

+92
-1
lines changed

NostalgiaForInfinityX5.py

+92-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class NostalgiaForInfinityX5(IStrategy):
6767
INTERFACE_VERSION = 3
6868

6969
def version(self) -> str:
70-
return "v15.1.307"
70+
return "v15.1.308"
7171

7272
stoploss = -0.99
7373

@@ -36344,6 +36344,13 @@ def short_exit_dec(
3634436344
and (last_candle["RSI_14_4h"] < 50.0)
3634536345
):
3634636346
return True, f"exit_{mode_name}_d_0_107"
36347+
elif (
36348+
(last_candle["RSI_3"] < 5.0)
36349+
and (last_candle["RSI_14"] > 54.0)
36350+
and (last_candle["RSI_3_1h"] > 40.0)
36351+
and (last_candle["STOCHRSIk_14_14_3_3_1h"] < 20.0)
36352+
):
36353+
return True, f"exit_{mode_name}_d_0_108"
3634736354
elif 0.02 > current_profit >= 0.01:
3634836355
if (
3634936356
(last_candle["WILLR_14"] < -99.0)
@@ -37212,6 +37219,13 @@ def short_exit_dec(
3721237219
and (last_candle["RSI_14_4h"] < 50.0)
3721337220
):
3721437221
return True, f"exit_{mode_name}_d_1_107"
37222+
elif (
37223+
(last_candle["RSI_3"] < 44.0)
37224+
and (last_candle["RSI_14"] > 52.0)
37225+
and (last_candle["RSI_3_1h"] > 40.0)
37226+
and (last_candle["STOCHRSIk_14_14_3_3_1h"] < 20.0)
37227+
):
37228+
return True, f"exit_{mode_name}_d_1_108"
3721537229
elif 0.03 > current_profit >= 0.02:
3721637230
if (
3721737231
(last_candle["WILLR_14"] < -99.0)
@@ -38080,6 +38094,13 @@ def short_exit_dec(
3808038094
and (last_candle["RSI_14_4h"] < 50.0)
3808138095
):
3808238096
return True, f"exit_{mode_name}_d_2_107"
38097+
elif (
38098+
(last_candle["RSI_3"] < 46.0)
38099+
and (last_candle["RSI_14"] > 50.0)
38100+
and (last_candle["RSI_3_1h"] > 40.0)
38101+
and (last_candle["STOCHRSIk_14_14_3_3_1h"] < 20.0)
38102+
):
38103+
return True, f"exit_{mode_name}_d_2_108"
3808338104
elif 0.04 > current_profit >= 0.03:
3808438105
if (
3808538106
(last_candle["WILLR_14"] < -99.0)
@@ -38948,6 +38969,13 @@ def short_exit_dec(
3894838969
and (last_candle["RSI_14_4h"] < 50.0)
3894938970
):
3895038971
return True, f"exit_{mode_name}_d_3_107"
38972+
elif (
38973+
(last_candle["RSI_3"] < 48.0)
38974+
and (last_candle["RSI_14"] > 48.0)
38975+
and (last_candle["RSI_3_1h"] > 40.0)
38976+
and (last_candle["STOCHRSIk_14_14_3_3_1h"] < 20.0)
38977+
):
38978+
return True, f"exit_{mode_name}_d_3_108"
3895138979
elif 0.05 > current_profit >= 0.04:
3895238980
if (
3895338981
(last_candle["WILLR_14"] < -99.0)
@@ -39816,6 +39844,13 @@ def short_exit_dec(
3981639844
and (last_candle["RSI_14_4h"] < 50.0)
3981739845
):
3981839846
return True, f"exit_{mode_name}_d_4_107"
39847+
elif (
39848+
(last_candle["RSI_3"] < 50.0)
39849+
and (last_candle["RSI_14"] > 46.0)
39850+
and (last_candle["RSI_3_1h"] > 40.0)
39851+
and (last_candle["STOCHRSIk_14_14_3_3_1h"] < 20.0)
39852+
):
39853+
return True, f"exit_{mode_name}_d_4_108"
3981939854
elif 0.06 > current_profit >= 0.05:
3982039855
if (
3982139856
(last_candle["WILLR_14"] < -99.0)
@@ -40684,6 +40719,13 @@ def short_exit_dec(
4068440719
and (last_candle["RSI_14_4h"] < 50.0)
4068540720
):
4068640721
return True, f"exit_{mode_name}_d_5_107"
40722+
elif (
40723+
(last_candle["RSI_3"] < 52.0)
40724+
and (last_candle["RSI_14"] > 44.0)
40725+
and (last_candle["RSI_3_1h"] > 40.0)
40726+
and (last_candle["STOCHRSIk_14_14_3_3_1h"] < 20.0)
40727+
):
40728+
return True, f"exit_{mode_name}_d_5_108"
4068740729
elif 0.07 > current_profit >= 0.06:
4068840730
if (
4068940731
(last_candle["WILLR_14"] < -99.0)
@@ -41552,6 +41594,13 @@ def short_exit_dec(
4155241594
and (last_candle["RSI_14_4h"] < 50.0)
4155341595
):
4155441596
return True, f"exit_{mode_name}_d_6_107"
41597+
elif (
41598+
(last_candle["RSI_3"] < 50.0)
41599+
and (last_candle["RSI_14"] > 46.0)
41600+
and (last_candle["RSI_3_1h"] > 40.0)
41601+
and (last_candle["STOCHRSIk_14_14_3_3_1h"] < 20.0)
41602+
):
41603+
return True, f"exit_{mode_name}_d_6_108"
4155541604
elif 0.08 > current_profit >= 0.07:
4155641605
if (
4155741606
(last_candle["WILLR_14"] < -99.0)
@@ -42420,6 +42469,13 @@ def short_exit_dec(
4242042469
and (last_candle["RSI_14_4h"] < 50.0)
4242142470
):
4242242471
return True, f"exit_{mode_name}_d_7_107"
42472+
elif (
42473+
(last_candle["RSI_3"] < 48.0)
42474+
and (last_candle["RSI_14"] > 48.0)
42475+
and (last_candle["RSI_3_1h"] > 40.0)
42476+
and (last_candle["STOCHRSIk_14_14_3_3_1h"] < 20.0)
42477+
):
42478+
return True, f"exit_{mode_name}_d_7_108"
4242342479
elif 0.09 > current_profit >= 0.08:
4242442480
if (
4242542481
(last_candle["WILLR_14"] < -99.0)
@@ -43288,6 +43344,13 @@ def short_exit_dec(
4328843344
and (last_candle["RSI_14_4h"] < 50.0)
4328943345
):
4329043346
return True, f"exit_{mode_name}_d_8_107"
43347+
elif (
43348+
(last_candle["RSI_3"] < 46.0)
43349+
and (last_candle["RSI_14"] > 50.0)
43350+
and (last_candle["RSI_3_1h"] > 40.0)
43351+
and (last_candle["STOCHRSIk_14_14_3_3_1h"] < 20.0)
43352+
):
43353+
return True, f"exit_{mode_name}_d_8_108"
4329143354
elif 0.1 > current_profit >= 0.09:
4329243355
if (
4329343356
(last_candle["WILLR_14"] < -99.0)
@@ -44156,6 +44219,13 @@ def short_exit_dec(
4415644219
and (last_candle["RSI_14_4h"] < 50.0)
4415744220
):
4415844221
return True, f"exit_{mode_name}_d_9_107"
44222+
elif (
44223+
(last_candle["RSI_3"] < 44.0)
44224+
and (last_candle["RSI_14"] > 52.0)
44225+
and (last_candle["RSI_3_1h"] > 40.0)
44226+
and (last_candle["STOCHRSIk_14_14_3_3_1h"] < 20.0)
44227+
):
44228+
return True, f"exit_{mode_name}_d_9_108"
4415944229
elif 0.12 > current_profit >= 0.1:
4416044230
if (
4416144231
(last_candle["WILLR_14"] < -99.0)
@@ -45024,6 +45094,13 @@ def short_exit_dec(
4502445094
and (last_candle["RSI_14_4h"] < 50.0)
4502545095
):
4502645096
return True, f"exit_{mode_name}_d_10_107"
45097+
elif (
45098+
(last_candle["RSI_3"] < 42.0)
45099+
and (last_candle["RSI_14"] > 54.0)
45100+
and (last_candle["RSI_3_1h"] > 40.0)
45101+
and (last_candle["STOCHRSIk_14_14_3_3_1h"] < 20.0)
45102+
):
45103+
return True, f"exit_{mode_name}_d_10_108"
4502745104
elif 0.2 > current_profit >= 0.12:
4502845105
if (
4502945106
(last_candle["WILLR_14"] < -99.0)
@@ -45892,6 +45969,13 @@ def short_exit_dec(
4589245969
and (last_candle["RSI_14_4h"] < 50.0)
4589345970
):
4589445971
return True, f"exit_{mode_name}_d_11_107"
45972+
elif (
45973+
(last_candle["RSI_3"] < 40.0)
45974+
and (last_candle["RSI_14"] > 56.0)
45975+
and (last_candle["RSI_3_1h"] > 40.0)
45976+
and (last_candle["STOCHRSIk_14_14_3_3_1h"] < 20.0)
45977+
):
45978+
return True, f"exit_{mode_name}_d_11_108"
4589545979
elif current_profit >= 0.2:
4589645980
if (
4589745981
(last_candle["WILLR_14"] < -99.0)
@@ -46760,6 +46844,13 @@ def short_exit_dec(
4676046844
and (last_candle["RSI_14_4h"] < 50.0)
4676146845
):
4676246846
return True, f"exit_{mode_name}_d_12_107"
46847+
elif (
46848+
(last_candle["RSI_3"] < 38.0)
46849+
and (last_candle["RSI_14"] > 58.0)
46850+
and (last_candle["RSI_3_1h"] > 40.0)
46851+
and (last_candle["STOCHRSIk_14_14_3_3_1h"] < 20.0)
46852+
):
46853+
return True, f"exit_{mode_name}_d_12_108"
4676346854

4676446855
# Here ends exit signal conditions for short_exit_dec
4676546856

0 commit comments

Comments
 (0)