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 a5bb8d5 commit 37b3798
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 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.298"
return "v14.0.299"

# ROI table:
minimal_roi = {
Expand Down Expand Up @@ -6121,6 +6121,18 @@ def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame
| (dataframe['ema_200_dec_24_4h'] == False)
| (dataframe['ema_200_dec_4_1d'] == False)
)
# 4h downtrend, 1d downmove, 15m still high, 1h & 4h low, 1h & 4h & 1d downtrend
&
(
(dataframe['not_downtrend_4h'])
| (dataframe['rsi_3_1d'] > 30.0)
| (dataframe['rsi_14_15m'] < 46.0)
| (dataframe['r_480_1h'] > -85.0)
| (dataframe['r_480_4h'] > -95.0)
| (dataframe['ema_200_dec_48_1h'] == False)
| (dataframe['ema_200_dec_24_4h'] == False)
| (dataframe['ema_200_dec_4_1d'] == False)
)
)

tok = time.perf_counter()
Expand Down

0 comments on commit 37b3798

Please sign in to comment.