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 Sep 26, 2023
1 parent 2bd8062 commit bd3f849
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.254"
return "v14.0.255"

# ROI table:
minimal_roi = {
Expand Down Expand Up @@ -5796,6 +5796,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 red, current 4h red, previous 4h green, 15m downtrend, 5m & 15m downmove, 1h & 4h & 1d still high, 1d downtrend
&
(
(dataframe['change_pct_1d'] > -0.01)
| (dataframe['change_pct_4h'] > -0.01)
| (dataframe['change_pct_4h'].shift(48) < 0.06)
| (dataframe['not_downtrend_15m'])
| (dataframe['rsi_3'] > 12.0)
| (dataframe['rsi_3_15m'] > 12.0)
| (dataframe['rsi_14_1h'] < 46.0)
| (dataframe['rsi_14_4h'] < 50.0)
| (dataframe['rsi_14_1d'] < 50.0)
| (dataframe['ema_200_dec_4_1d'] == False)
)
)

tok = time.perf_counter()
Expand Down

0 comments on commit bd3f849

Please sign in to comment.