Skip to content

Commit b231018

Browse files
committed
X4: add global buy protection rule.
1 parent d07b008 commit b231018

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.307"
68+
return "v14.0.308"
6969

7070
# ROI table:
7171
minimal_roi = {
@@ -6233,6 +6233,21 @@ def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame
62336233
| (dataframe['rsi_14_4h'] < 50.0)
62346234
| (dataframe['rsi_14_1d'] < 50.0)
62356235
)
6236+
# current 4h red with top wick, 5m & 1h downmove, 1h & 4h still high, 1h & 4h & 1d downtrend
6237+
&
6238+
(
6239+
(dataframe['change_pct_4h'] > -0.02)
6240+
| (dataframe['top_wick_pct_4h'] < 0.02)
6241+
| (dataframe['rsi_3'] > 16.0)
6242+
| (dataframe['rsi_3_1h'] > 30.0)
6243+
| (dataframe['cti_20_1h'] < -0.5)
6244+
| (dataframe['rsi_14_1h'] < 46.0)
6245+
| (dataframe['cti_20_4h'] < 0.5)
6246+
| (dataframe['rsi_14_4h'] < 50.0)
6247+
| (dataframe['ema_200_dec_48_1h'] == False)
6248+
| (dataframe['ema_200_dec_24_4h'] == False)
6249+
| (dataframe['ema_200_dec_4_1d'] == False)
6250+
)
62366251
)
62376252

62386253
tok = time.perf_counter()

0 commit comments

Comments
 (0)