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 Jan 31, 2025
1 parent b82779f commit 6ae1b5f
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 @@ -5817,6 +5817,23 @@ def populate_indicators(self, df: DataFrame, metadata: dict) -> DataFrame:
| (df["STOCHRSIk_14_14_3_3_4h"] < 40.0)
| (df["ROC_9_4h"] < 20.0)
)
# 1d P&D, 15m& 1h down move, 15m & 1h still not low enough, 4h still high
& (
(df["change_pct_1d"] < 20.0)
| (df["top_wick_pct_1d"] < 20.0)
| (df["RSI_3_15m"] > 25.0)
| (df["RSI_3_1h"] > 45.0)
| (df["RSI_14_15m"] < 30.0)
| (df["CCI_20_15m"] < -150.0)
| (df["RSI_14_1h"] < 40.0)
| (df["AROONU_14_1h"] < 50.0)
| (df["CCI_20_1h"] < -100.0)
| (df["STOCHRSIk_14_14_3_3_1h"] < 10.0)
| (df["RSI_14_4h"] < 45.0)
| (df["AROONU_14_4h"] < 50.0)
| (df["CCI_20_4h"] < -0.0)
| (df["STOCHRSIk_14_14_3_3_4h"] < 30.0)
)
# 1d green with top wick, 15m & 4h down move, 15m & 1h & 4h still high, 1d high & overbought
& (
(df["change_pct_1d"] < 20.0)
Expand Down

0 comments on commit 6ae1b5f

Please sign in to comment.