Skip to content

Commit 784b6ef

Browse files
committed
Buy 46: rework.
1 parent 2e17800 commit 784b6ef

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

NostalgiaForInfinityNext.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,12 +1141,12 @@ class NostalgiaForInfinityNext(IStrategy):
11411141
},
11421142
46: {
11431143
"ema_fast" : True,
1144-
"ema_fast_len" : "50",
1144+
"ema_fast_len" : "12",
11451145
"ema_slow" : True,
1146-
"ema_slow_len" : "50",
1147-
"close_above_ema_fast" : True,
1146+
"ema_slow_len" : "12",
1147+
"close_above_ema_fast" : False,
11481148
"close_above_ema_fast_len" : "200",
1149-
"close_above_ema_slow" : False,
1149+
"close_above_ema_slow" : True,
11501150
"close_above_ema_slow_len" : "200",
11511151
"sma200_rising" : False,
11521152
"sma200_rising_val" : "30",
@@ -1631,10 +1631,12 @@ class NostalgiaForInfinityNext(IStrategy):
16311631
buy_45_cti_1h_max = 0.9
16321632
buy_45_r = -55.0
16331633

1634-
buy_46_ema_open_mult = 0.016
1635-
buy_46_bb_offset = 0.992
1636-
buy_46_ma_offset_low = 0.9
1637-
buy_46_cti_1h_max = 0.85
1634+
buy_46_ema_open_mult = 0.0218
1635+
buy_46_bb_offset = 0.998
1636+
buy_46_ma_offset_low = 0.915
1637+
buy_46_cti_1h_max = 0.9
1638+
buy_46_cti = -0.6
1639+
buy_43_r_1h_max = -10.0
16381640

16391641
# Sell
16401642

@@ -4461,6 +4463,8 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
44614463
item_buy_logic.append(dataframe['close'] < (dataframe['bb20_2_low'] * self.buy_46_bb_offset))
44624464
item_buy_logic.append(dataframe['close'] > dataframe['sma_30'] * self.buy_46_ma_offset_low)
44634465
item_buy_logic.append(dataframe['cti_1h'] < self.buy_46_cti_1h_max)
4466+
item_buy_logic.append(dataframe['cti'] < self.buy_46_cti)
4467+
item_buy_logic.append(dataframe['r_480_1h'] < self.buy_43_r_1h_max)
44644468

44654469
item_buy_logic.append(dataframe['volume'] > 0)
44664470
item_buy = reduce(lambda x, y: x & y, item_buy_logic)

0 commit comments

Comments
 (0)