Skip to content

Commit 6880420

Browse files
committed
Buy condition 9: semi swing, local dip, uptrend, 1h uptrend.
1 parent 8b37d40 commit 6880420

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

NostalgiaForInfinityNextGen.py

+43
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ class NostalgiaForInfinityNextGen(IStrategy):
188188
"buy_condition_6_enable": True,
189189
"buy_condition_7_enable": True,
190190
"buy_condition_8_enable": True,
191+
"buy_condition_9_enable": True,
191192
#############
192193
}
193194

@@ -423,6 +424,34 @@ class NostalgiaForInfinityNextGen(IStrategy):
423424
"close_over_pivot_offset" : 1.0,
424425
"close_under_pivot_type" : "none", # pivot, sup1, sup2, sup3, res1, res2, res3
425426
"close_under_pivot_offset" : 1.15
427+
},
428+
9: {
429+
"ema_fast" : False,
430+
"ema_fast_len" : "50",
431+
"ema_slow" : True,
432+
"ema_slow_len" : "12",
433+
"close_above_ema_fast" : False,
434+
"close_above_ema_fast_len" : "200",
435+
"close_above_ema_slow" : False,
436+
"close_above_ema_slow_len" : "200",
437+
"sma200_rising" : False,
438+
"sma200_rising_val" : "24",
439+
"sma200_1h_rising" : False,
440+
"sma200_1h_rising_val" : "50",
441+
"safe_dips_threshold_0" : 0.04,
442+
"safe_dips_threshold_2" : 0.1,
443+
"safe_dips_threshold_12" : 0.26,
444+
"safe_dips_threshold_144" : 0.38,
445+
"safe_pump_6h_threshold" : None,
446+
"safe_pump_12h_threshold" : None,
447+
"safe_pump_24h_threshold" : None,
448+
"safe_pump_36h_threshold" : None,
449+
"safe_pump_48h_threshold" : 0.9,
450+
"btc_1h_not_downtrend" : False,
451+
"close_over_pivot_type" : "none", # pivot, sup1, sup2, sup3, res1, res2, res3
452+
"close_over_pivot_offset" : 1.0,
453+
"close_under_pivot_type" : "none", # pivot, sup1, sup2, sup3, res1, res2, res3
454+
"close_under_pivot_offset" : 1.0
426455
}
427456
}
428457

@@ -2071,6 +2100,20 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
20712100
item_buy_logic.append(dataframe['r_14'] < -90.0)
20722101
item_buy_logic.append(dataframe['cti_1h'] < -0.25)
20732102

2103+
# Condition #9 - Semi swing. Local deep. Uptrend, 1h uptrend.
2104+
elif index == 9:
2105+
# Non-Standard protections
2106+
2107+
# Logic
2108+
item_buy_logic.append(dataframe['ema_20_1h'] > dataframe['ema_25_1h'])
2109+
item_buy_logic.append(dataframe['close'].shift(1) < (dataframe['sma_15'].shift(1) * 0.97))
2110+
item_buy_logic.append(dataframe['close'] > (dataframe['open'].shift(1)))
2111+
item_buy_logic.append(dataframe['ewo'] > 4.4)
2112+
item_buy_logic.append(dataframe['cti'] < -0.75)
2113+
item_buy_logic.append(dataframe['r_14'].shift(1) < -94.0)
2114+
item_buy_logic.append(dataframe['ewo_1h'] > 2.0)
2115+
item_buy_logic.append(dataframe['cti_1h'] < -0.75)
2116+
20742117
item_buy_logic.append(dataframe['volume'] > 0)
20752118
item_buy = reduce(lambda x, y: x & y, item_buy_logic)
20762119
dataframe.loc[item_buy, 'buy_tag'] += f"{index} "

0 commit comments

Comments
 (0)