Skip to content

Commit

Permalink
X3: add global buy protection rule.
Browse files Browse the repository at this point in the history
  • Loading branch information
iterativv committed Dec 18, 2023
1 parent 0476e7f commit 8e46271
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion NostalgiaForInfinityX3.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class NostalgiaForInfinityX3(IStrategy):
INTERFACE_VERSION = 3

def version(self) -> str:
return "v13.0.997"
return "v13.0.998"

# ROI table:
minimal_roi = {
Expand Down Expand Up @@ -11654,6 +11654,21 @@ def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame
| (dataframe["close"] > dataframe["zlma_50_1h"])
| (dataframe["ema_200_dec_48_1h"] == False)
)
# current 4h red, previous 4h green, 1h downtrend, 1h downmove, 5m & 15m & 1h & 4h & 1d still high
& (
(dataframe["change_pct_4h"] > -0.03)
| (dataframe["change_pct_4h"].shift(48) < 0.03)
| (dataframe["not_downtrend_1h"])
| (dataframe["rsi_3_1h"] > 30.0)
| (dataframe["rsi_14"] < 30.0)
| (dataframe["rsi_14_15m"] < 30.0)
| (dataframe["rsi_14_1h"] < 36.0)
| (dataframe["cti_20_4h"] < 0.5)
| (dataframe["rsi_14_4h"] < 46.0)
| (dataframe["rsi_14_max_6_4h"] < 70.0)
| (dataframe["rsi_14_1d"] < 46.0)
| (dataframe["close"] > dataframe["zlma_50_1h"])
)
)

# Global protections
Expand Down

0 comments on commit 8e46271

Please sign in to comment.