Skip to content

Commit eaf1d43

Browse files
committed
X5: add global protection rule (Long).
1 parent e2c0fa3 commit eaf1d43

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

NostalgiaForInfinityX5.py

+21-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.314"
70+
return "v15.1.315"
7171

7272
stoploss = -0.99
7373

@@ -6115,6 +6115,26 @@ def populate_indicators(self, df: DataFrame, metadata: dict) -> DataFrame:
61156115
| (df["CCI_20_4h"] < -250.0)
61166116
| (df["RSI_14_1d"] < 30.0)
61176117
)
6118+
# 15m & 1h & 4h & 1d down move, 15m & 1h & 4h still not low enough, 1d still high
6119+
& (
6120+
(df["RSI_3_15m"] > 15.0)
6121+
| (df["RSI_3_1h"] > 25.0)
6122+
| (df["RSI_3_4h"] > 25.0)
6123+
| (df["RSI_3_1d"] > 40.0)
6124+
| (df["RSI_14_15m"] < 20.0)
6125+
| (df["CCI_20_15m"] < -200.0)
6126+
| (df["STOCHk_14_3_3_15m"] < 10.0)
6127+
| (df["RSI_14_1h"] < 20.0)
6128+
| (df["WILLR_14_1h"] < -90.0)
6129+
| (df["CCI_20_1h"] < -200.0)
6130+
| (df["STOCHk_14_3_3_1h"] < 20.0)
6131+
| (df["RSI_14_4h"] < 30.0)
6132+
| (df["WILLR_14_4h"] < -90.0)
6133+
| (df["CCI_20_4h"] < -200.0)
6134+
| (df["STOCHk_14_3_3_4h"] < 20.0)
6135+
| (df["RSI_14_1d"] < 50.0)
6136+
| (df["STOCHk_14_3_3_1d"] < 50.0)
6137+
)
61186138
# 15m & 1h & 4h & 1d down move, 15m & 1h & 4h & 1d still not low enough
61196139
& (
61206140
(df["RSI_3_15m"] > 15.0)

0 commit comments

Comments
 (0)