Skip to content

Commit 4b52c14

Browse files
committed
X4: add global buy protection rule.
1 parent 501f422 commit 4b52c14

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

NostalgiaForInfinityX4.py

+17-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.312"
68+
return "v14.0.313"
6969

7070
# ROI table:
7171
minimal_roi = {
@@ -6308,6 +6308,22 @@ def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame
63086308
| (dataframe['cti_20_1d'] < 0.5)
63096309
| (dataframe['rsi_14_1d'] < 46.0)
63106310
)
6311+
# 1h downtrend, 5m & 15m & 1h downmove, 15m & 1h & 4h & 1d still high
6312+
&
6313+
(
6314+
(dataframe['not_downtrend_1h'])
6315+
| (dataframe['rsi_3'] > 16.0)
6316+
| (dataframe['close'] > dataframe['bb20_2_low_15m'])
6317+
| (dataframe['close'] > dataframe['sup_level_4h'])
6318+
| (dataframe['close'] > dataframe['sup_level_1d'])
6319+
| (dataframe['rsi_3_15m'] > 26.0)
6320+
| (dataframe['rsi_3_1h'] > 30.0)
6321+
| (dataframe['rsi_14_15m'] < 30.0)
6322+
| (dataframe['cti_20_1h'] < -0.8)
6323+
| (dataframe['rsi_14_1h'] < 36.0)
6324+
| (dataframe['rsi_14_4h'] < 40.0)
6325+
| (dataframe['rsi_14_1d'] < 40.0)
6326+
)
63116327
)
63126328

63136329
tok = time.perf_counter()

0 commit comments

Comments
 (0)