Skip to content

Commit 19a3c4e

Browse files
committed
X4: add global buy protection rule.
1 parent 531fac3 commit 19a3c4e

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

NostalgiaForInfinityX4.py

+16-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class NostalgiaForInfinityX4(IStrategy):
6565
INTERFACE_VERSION = 3
6666

6767
def version(self) -> str:
68-
return "v14.0.314"
68+
return "v14.0.315"
6969

7070
# ROI table:
7171
minimal_roi = {
@@ -6336,6 +6336,21 @@ def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame
63366336
| (dataframe['ema_200_dec_48_1h'] == False)
63376337
| (dataframe['ema_200_dec_24_4h'] == False)
63386338
)
6339+
# 1h downtrend, 5m & 15m & 1h downmove, 1h & 4h & 1d still high, 1h downtrend
6340+
&
6341+
(
6342+
(dataframe['not_downtrend_1h'])
6343+
| (dataframe['close'] > dataframe['bb20_2_low_15m'])
6344+
| (dataframe['close'] > dataframe['bb20_2_low_1h'])
6345+
| (dataframe['close'] > dataframe['sup_level_4h'])
6346+
| (dataframe['close'] > dataframe['sup_level_1d'])
6347+
| (dataframe['rsi_3_1h'] > 16.0)
6348+
| (dataframe['cti_20_1h'] < 0.5)
6349+
| (dataframe['rsi_14_1h'] < 36.0)
6350+
| (dataframe['rsi_14_4h'] < 46.0)
6351+
| (dataframe['rsi_14_1d'] < 46.0)
6352+
| (dataframe['ema_200_dec_48_1h'] == False)
6353+
)
63396354
)
63406355

63416356
tok = time.perf_counter()

0 commit comments

Comments
 (0)