Skip to content

Commit adf17a0

Browse files
committed
Buy 14: rework.
1 parent 6ea0daf commit adf17a0

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

NostalgiaForInfinityNext.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,10 +1497,10 @@ class NostalgiaForInfinityNext(IStrategy):
14971497
buy_13_ewo = -6.5
14981498
buy_13_r_1h = -78.0
14991499

1500-
buy_ema_open_mult_14 = 0.014
1501-
buy_bb_offset_14 = 0.988
1502-
buy_ma_offset_14 = 0.945
1503-
buy_cti_14 = -0.86
1500+
buy_14_ema_open_mult = 0.014
1501+
buy_14_bb_offset = 0.989
1502+
buy_14_ma_offset = 0.945
1503+
buy_14_cti = -0.85
15041504

15051505
buy_15_ema_rel = 0.974
15061506
buy_15_ema_open_mult = 0.0238
@@ -4251,11 +4251,11 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
42514251

42524252
# Logic
42534253
item_buy_logic.append(dataframe['ema_26'] > dataframe['ema_12'])
4254-
item_buy_logic.append((dataframe['ema_26'] - dataframe['ema_12']) > (dataframe['open'] * self.buy_ema_open_mult_14))
4254+
item_buy_logic.append((dataframe['ema_26'] - dataframe['ema_12']) > (dataframe['open'] * self.buy_14_ema_open_mult))
42554255
item_buy_logic.append((dataframe['ema_26'].shift() - dataframe['ema_12'].shift()) > (dataframe['open'] / 100))
4256-
item_buy_logic.append(dataframe['close'] < (dataframe['bb20_2_low'] * self.buy_bb_offset_14))
4257-
item_buy_logic.append(dataframe['close'] < dataframe['ema_20'] * self.buy_ma_offset_14)
4258-
item_buy_logic.append(dataframe['cti'] < self.buy_cti_14)
4256+
item_buy_logic.append(dataframe['close'] < (dataframe['bb20_2_low'] * self.buy_14_bb_offset))
4257+
item_buy_logic.append(dataframe['close'] < dataframe['ema_20'] * self.buy_14_ma_offset)
4258+
item_buy_logic.append(dataframe['cti'] < self.buy_14_cti)
42594259

42604260
# Condition #15
42614261
elif index == 15:

0 commit comments

Comments
 (0)