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 Oct 13, 2023
1 parent c2fad4a commit 9f65c30
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion NostalgiaForInfinityX4.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class NostalgiaForInfinityX4(IStrategy):
INTERFACE_VERSION = 3

def version(self) -> str:
return "v14.0.329"
return "v14.0.330"

# ROI table:
minimal_roi = {
Expand Down Expand Up @@ -6523,6 +6523,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 1d long green, 5m & 15m downmove, 15m & 1h & 4h & 1d still high, 1h & 4h & 1d downtrend
&
(
(dataframe['change_pct_1d'] < 0.16)
| (dataframe['rsi_3'] > 26.0)
| (dataframe['rsi_3_15m'] > 30.0)
| (dataframe['rsi_14_15m'] < 40.0)
| (dataframe['rsi_14_1h'] < 40.0)
| (dataframe['rsi_14_4h'] < 40.0)
| (dataframe['rsi_14_1d'] < 40.0)
| (dataframe['ema_200_dec_48_1h'] == False)
| (dataframe['ema_200_dec_24_4h'] == False)
| (dataframe['ema_200_dec_4_1d'] == False)
)
)

tok = time.perf_counter()
Expand Down

0 comments on commit 9f65c30

Please sign in to comment.