Skip to content

Commit

Permalink
X4: add global buy protection rule.
Browse files Browse the repository at this point in the history
  • Loading branch information
iterativv committed Oct 10, 2023
1 parent e901a96 commit ce3ab23
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion NostalgiaForInfinityX4.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class NostalgiaForInfinityX4(IStrategy):
INTERFACE_VERSION = 3

def version(self) -> str:
return "v14.0.311"
return "v14.0.312"

# ROI table:
minimal_roi = {
Expand Down Expand Up @@ -6291,6 +6291,23 @@ def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame
| (dataframe['rsi_14_1d'] < 40.0)
| (dataframe['ema_200_dec_48_1h'] == False)
)
# 4m & 15m downmove,15m & 1h & 4h & 1d still high
&
(
(dataframe['rsi_3'] > 26.0)
| (dataframe['close'] > dataframe['bb20_2_low_15m'])
| (dataframe['close'] > dataframe['bb20_2_low_1h'])
| (dataframe['close'] > dataframe['sup_level_4h'])
| (dataframe['rsi_3_15m'] > 30.0)
| (dataframe['cti_20_15m'] < -0.5)
| (dataframe['rsi_14_15m'] < 33.0)
| (dataframe['cti_20_1h'] < -0.8)
| (dataframe['rsi_14_1h'] < 46.0)
| (dataframe['cti_20_4h'] < -0.8)
| (dataframe['rsi_14_4h'] < 46.0)
| (dataframe['cti_20_1d'] < 0.5)
| (dataframe['rsi_14_1d'] < 46.0)
)
)

tok = time.perf_counter()
Expand Down

0 comments on commit ce3ab23

Please sign in to comment.