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 6b18d5c commit 7905503
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.330"
return "v14.0.331"

# ROI table:
minimal_roi = {
Expand Down Expand Up @@ -6537,6 +6537,20 @@ def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame
| (dataframe['ema_200_dec_24_4h'] == False)
| (dataframe['ema_200_dec_4_1d'] == False)
)
# 15m & 1h downtrend, 5m & 15m downmove, 15m & 1h & 4h * 1d still high
&
(
(dataframe['not_downtrend_15m'])
| (dataframe['not_downtrend_1h'])
| (dataframe['rsi_3'] > 16.0)
| (dataframe['close'] > dataframe['bb20_2_low_15m'])
| (dataframe['close'] > dataframe['bb20_2_low_1h'])
| (dataframe['rsi_3_15m'] > 30.0)
| (dataframe['rsi_14_15m'] < 36.0)
| (dataframe['rsi_14_1h'] < 36.0)
| (dataframe['rsi_14_4h'] < 46.0)
| (dataframe['rsi_14_1d'] < 46.0)
)
)

tok = time.perf_counter()
Expand Down

0 comments on commit 7905503

Please sign in to comment.