Skip to content

Commit f211e77

Browse files
committed
custom_sell: rework.
1 parent 8a4185f commit f211e77

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

NostalgiaForInfinityNext.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3393,72 +3393,72 @@ def custom_sell(self, pair: str, trade: 'Trade', current_time: 'datetime', curre
33933393
# Sell signal 1
33943394
if self.sell_condition_1_enable and (last_candle['rsi_14'] > self.sell_rsi_bb_1) and (last_candle['close'] > last_candle['bb20_2_upp']) and (previous_candle_1['close'] > previous_candle_1['bb20_2_upp']) and (previous_candle_2['close'] > previous_candle_2['bb20_2_upp']) and (previous_candle_3['close'] > previous_candle_3['bb20_2_upp']) and (previous_candle_4['close'] > previous_candle_4['bb20_2_upp']) and (previous_candle_5['close'] > previous_candle_5['bb20_2_upp']):
33953395
if (last_candle['close'] > last_candle['ema_200']):
3396-
if (current_profit > 0.0):
3396+
if (current_profit > 0.01):
33973397
return f"sell_signal_1_1_1 ( {buy_tag} )"
33983398
else:
3399-
if (current_profit > 0.0):
3399+
if (current_profit > 0.01):
34003400
return f"sell_signal_1_2_1 ( {buy_tag} )"
34013401
elif (max_loss > 0.25):
34023402
return f"sell_signal_1_2_2 ( {buy_tag} )"
34033403

34043404
# Sell signal 2
34053405
elif (self.sell_condition_2_enable) and (last_candle['rsi_14'] > self.sell_rsi_bb_2) and (last_candle['close'] > last_candle['bb20_2_upp']) and (previous_candle_1['close'] > previous_candle_1['bb20_2_upp']) and (previous_candle_2['close'] > previous_candle_2['bb20_2_upp']):
34063406
if (last_candle['close'] > last_candle['ema_200']):
3407-
if (current_profit > 0.0):
3407+
if (current_profit > 0.01):
34083408
return f"sell_signal_2_1_1 ( {buy_tag} )"
34093409
else:
3410-
if (current_profit > 0.0):
3410+
if (current_profit > 0.01):
34113411
return f"sell_signal_2_2_1 ( {buy_tag} )"
34123412
elif (max_loss > 0.25):
34133413
return f"sell_signal_2_2_2 ( {buy_tag} )"
34143414

34153415
# Sell signal 3
34163416
elif (self.sell_condition_3_enable) and (last_candle['rsi_14'] > self.sell_rsi_main_3):
34173417
if (last_candle['close'] > last_candle['ema_200']):
3418-
if (current_profit > 0.0):
3418+
if (current_profit > 0.01):
34193419
return f"sell_signal_3_1_1 ( {buy_tag} )"
34203420
else:
3421-
if (current_profit > 0.0):
3421+
if (current_profit > 0.01):
34223422
return f"sell_signal_3_2_1 ( {buy_tag} )"
34233423
elif (max_loss > 0.25):
34243424
return f"sell_signal_3_2_2 ( {buy_tag} )"
34253425

34263426
# Sell signal 4
34273427
elif self.sell_condition_4_enable and (last_candle['rsi_14'] > self.sell_dual_rsi_rsi_4) and (last_candle['rsi_14_1h'] > self.sell_dual_rsi_rsi_1h_4):
34283428
if (last_candle['close'] > last_candle['ema_200']):
3429-
if (current_profit > 0.0):
3429+
if (current_profit > 0.01):
34303430
return f"sell_signal_4_1_1 ( {buy_tag} )"
34313431
else:
3432-
if (current_profit > 0.0):
3432+
if (current_profit > 0.01):
34333433
return f"sell_signal_4_2_1 ( {buy_tag} )"
34343434
elif (max_loss > 0.25):
34353435
return f"sell_signal_4_2_2 ( {buy_tag} )"
34363436

34373437
# Sell signal 6
34383438
elif self.sell_condition_6_enable and (last_candle['close'] < last_candle['ema_200']) and (last_candle['close'] > last_candle['ema_50']) and (last_candle['rsi_14'] > self.sell_rsi_under_6):
3439-
if (current_profit > 0.0):
3439+
if (current_profit > 0.01):
34403440
return f"sell_signal_6_1 ( {buy_tag} )"
34413441
elif (max_loss > 0.25):
34423442
return f"sell_signal_6_2 ( {buy_tag} )"
34433443

34443444
# Sell signal 7
34453445
elif self.sell_condition_7_enable and (last_candle['rsi_14_1h'] > self.sell_rsi_1h_7) and (last_candle['crossed_below_ema_12_26']):
34463446
if (last_candle['close'] > last_candle['ema_200']):
3447-
if (current_profit > 0.0):
3447+
if (current_profit > 0.01):
34483448
return f"sell_signal_7_1_1 ( {buy_tag} )"
34493449
else:
3450-
if (current_profit > 0.0):
3450+
if (current_profit > 0.01):
34513451
return f"sell_signal_7_2_1 ( {buy_tag} )"
34523452
elif (max_loss > 0.25):
34533453
return f"sell_signal_7_2_2 ( {buy_tag} )"
34543454

34553455
# Sell signal 8
34563456
elif self.sell_condition_8_enable and (last_candle['close'] > last_candle['bb20_2_upp_1h'] * self.sell_bb_relative_8):
34573457
if (last_candle['close'] > last_candle['ema_200']):
3458-
if (current_profit > 0.0):
3458+
if (current_profit > 0.01):
34593459
return f"sell_signal_8_1_1 ( {buy_tag} )"
34603460
else:
3461-
if (current_profit > 0.0):
3461+
if (current_profit > 0.01):
34623462
return f"sell_signal_8_2_1 ( {buy_tag} )"
34633463
elif (max_loss > 0.25):
34643464
return f"sell_signal_8_2_2 ( {buy_tag} )"

0 commit comments

Comments
 (0)