@@ -188,6 +188,7 @@ class NostalgiaForInfinityNextGen(IStrategy):
188
188
"buy_condition_6_enable" : True ,
189
189
"buy_condition_7_enable" : True ,
190
190
"buy_condition_8_enable" : True ,
191
+ "buy_condition_9_enable" : True ,
191
192
#############
192
193
}
193
194
@@ -423,6 +424,34 @@ class NostalgiaForInfinityNextGen(IStrategy):
423
424
"close_over_pivot_offset" : 1.0 ,
424
425
"close_under_pivot_type" : "none" , # pivot, sup1, sup2, sup3, res1, res2, res3
425
426
"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
426
455
}
427
456
}
428
457
@@ -2071,6 +2100,20 @@ def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
2071
2100
item_buy_logic .append (dataframe ['r_14' ] < - 90.0 )
2072
2101
item_buy_logic .append (dataframe ['cti_1h' ] < - 0.25 )
2073
2102
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
+
2074
2117
item_buy_logic .append (dataframe ['volume' ] > 0 )
2075
2118
item_buy = reduce (lambda x , y : x & y , item_buy_logic )
2076
2119
dataframe .loc [item_buy , 'buy_tag' ] += f"{ index } "
0 commit comments