Skip to content

Commit

Permalink
X5: add global protection rule (Long).
Browse files Browse the repository at this point in the history
  • Loading branch information
iterativv committed Nov 26, 2024
1 parent fed9c7f commit 880bf91
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions NostalgiaForInfinityX5.py
Original file line number Diff line number Diff line change
Expand Up @@ -3565,6 +3565,23 @@ def populate_indicators(self, df: DataFrame, metadata: dict) -> DataFrame:
| (df["RSI_3_4h"] > 40.0)
| (df["RSI_3_4h"].shift(48) < 80.0)
)
# 4h green with top wick, 15m & 1h down move, 15m & 1h still high, 4h high & overbought
& (
(df["change_pct_4h"] < 5.0)
| (df["top_wick_pct_4h"] < 5.0)
| (df["RSI_3_15m"] > 35.0)
| (df["RSI_3_1h"] > 60.0)
| (df["RSI_14_15m"] < 40.0)
| (df["AROONU_14_15m"] < 25.0)
| (df["STOCHk_14_3_3_15m"] < 20.0)
| (df["RSI_14_1h"] < 50.0)
| (df["AROONU_14_1h"] < 75.0)
| (df["STOCHk_14_3_3_1h"] < 40.0)
| (df["RSI_14_4h"] < 70.0)
| (df["AROONU_14_4h"] < 75.0)
| (df["STOCHk_14_3_3_4h"] < 50.0)
| (df["ROC_9_4h"] < 20.0)
)
# 5h green with top wick, 15m down move, 15m still high, 1h still high, 4h high
& (
(df["change_pct_4h"] < 5.0)
Expand Down

0 comments on commit 880bf91

Please sign in to comment.