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 8, 2023
1 parent e266123 commit 2da319c
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 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.300"
return "v14.0.301"

# ROI table:
minimal_roi = {
Expand Down Expand Up @@ -6148,6 +6148,19 @@ def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame
| (dataframe['ema_200_dec_24_4h'] == False)
| (dataframe['ema_200_dec_4_1d'] == False)
)
# 1d downtrend, 5m & 15m downmove, 15m & 1h & 4h still high, 4h & 1d downtrend
&
(
(dataframe['not_downtrend_1d'])
| (dataframe['rsi_3'] > 10.0)
| (dataframe['rsi_3_15m'] > 30.0)
| (dataframe['rsi_14_15m'] < 36.0)
| (dataframe['cti_20_1h'] < 0.5)
| (dataframe['rsi_14_1h'] < 46.0)
| (dataframe['rsi_14_4h'] < 46.0)
| (dataframe['ema_200_dec_24_4h'] == False)
| (dataframe['ema_200_dec_4_1d'] == False)
)
)

tok = time.perf_counter()
Expand Down

0 comments on commit 2da319c

Please sign in to comment.