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 May 5, 2024
1 parent 540f23b commit 2f27da2
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion NostalgiaForInfinityX4.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class NostalgiaForInfinityX4(IStrategy):
INTERFACE_VERSION = 3

def version(self) -> str:
return "v14.1.671"
return "v14.1.672"

stoploss = -0.99

Expand Down Expand Up @@ -13928,6 +13928,17 @@ def populate_indicators(self, df: DataFrame, metadata: dict) -> DataFrame:
| (df["close"] > df["sup_level_1h"])
| (df["close"] > df["sup_level_4h"])
)
& (
(df["change_pct_1h"] > -0.01)
| (df["rsi_14"] > df["rsi_14"].shift(12))
| (df["rsi_14_15m"] > df["rsi_14_15m"].shift(12))
| (df["rsi_14_15m"] < 40.0)
| (df["rsi_14_1h"] < 46.0)
| (df["rsi_14_4h"] < 50.0)
| (df["close"] < df["res_hlevel_4h"])
| (df["close"] < df["res_hlevel_1d"])
| (df["ema_200_dec_24_4h"] == False)
)
)

df["protections_short_global"] = True
Expand Down

0 comments on commit 2f27da2

Please sign in to comment.