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 Oct 19, 2023
1 parent 4f734f9 commit 709d4c7
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion NostalgiaForInfinityX3.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class NostalgiaForInfinityX3(IStrategy):
INTERFACE_VERSION = 3

def version(self) -> str:
return "v13.0.713"
return "v13.0.714"

# ROI table:
minimal_roi = {
Expand Down Expand Up @@ -6742,6 +6742,19 @@ def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame
| (dataframe['cti_20_1d'] < -0.5)
| (dataframe['rsi_14_1d'] < 46.0)
)
# 1h & 4h & 1d downtrend, 15m & 4h & 1d downmove, 1h & 4h & 1d downtrend
&
(
(dataframe['not_downtrend_1h'])
| (dataframe['not_downtrend_4h'])
| (dataframe['not_downtrend_1d'])
| (dataframe['rsi_3_15m'] > 26.0)
| (dataframe['rsi_3_4h'] > 30.0)
| (dataframe['rsi_3_1d'] > 30.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 709d4c7

Please sign in to comment.