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 438d3d3 commit 443f518
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 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.1001"
return "v13.0.1002"

# ROI table:
minimal_roi = {
Expand Down Expand Up @@ -11712,6 +11712,20 @@ def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame
| (dataframe["ema_200_dec_24_4h"] == False)
| (dataframe["ema_200_dec_4_1d"] == False)
)
# current 1h red with top wick, 1h downtrend, 15m & 1h downmove, 5m & 15m & 1h & 4h still high, 1h downtrend
& (
(dataframe["change_pct_1h"] > -0.01)
| (dataframe["top_wick_pct_1h"] < 0.01)
| (dataframe["not_downtrend_1h"])
| (dataframe["rsi_3_15m"] > 30.0)
| (dataframe["rsi_3_1h"] > 36.0)
| (dataframe["rsi_14"] < 30.0)
| (dataframe["rsi_14_15m"] < 36.0)
| (dataframe["cti_20_1h"] < 0.5)
| (dataframe["rsi_14_1h"] < 40.0)
| (dataframe["rsi_14_4h"] < 40.0)
| (dataframe["ema_200_dec_48_1h"] == False)
)
)

# Global protections
Expand Down

0 comments on commit 443f518

Please sign in to comment.