mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-02-06 14:20:24 +00:00
@@ -1030,9 +1030,7 @@ class FreqtradeBot(LoggingMixin):
|
|||||||
trade.adjust_stop_loss(trade.open_rate, stoploss, initial=True)
|
trade.adjust_stop_loss(trade.open_rate, stoploss, initial=True)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# This is additional entry, we reset fee_open_currency so fee checking can work
|
|
||||||
trade.is_open = True
|
trade.is_open = True
|
||||||
trade.fee_open_currency = None
|
|
||||||
trade.set_funding_fees(funding_fees)
|
trade.set_funding_fees(funding_fees)
|
||||||
|
|
||||||
trade.orders.append(order_obj)
|
trade.orders.append(order_obj)
|
||||||
@@ -1283,6 +1281,7 @@ class FreqtradeBot(LoggingMixin):
|
|||||||
if (
|
if (
|
||||||
not trade.has_open_orders
|
not trade.has_open_orders
|
||||||
and not trade.has_open_sl_orders
|
and not trade.has_open_sl_orders
|
||||||
|
and trade.fee_open_currency is not None
|
||||||
and not self.wallets.check_exit_amount(trade)
|
and not self.wallets.check_exit_amount(trade)
|
||||||
):
|
):
|
||||||
logger.warning(
|
logger.warning(
|
||||||
@@ -2345,6 +2344,10 @@ class FreqtradeBot(LoggingMixin):
|
|||||||
# If a entry order was closed, force update on stoploss on exchange
|
# If a entry order was closed, force update on stoploss on exchange
|
||||||
if order.ft_order_side == trade.entry_side:
|
if order.ft_order_side == trade.entry_side:
|
||||||
if send_msg:
|
if send_msg:
|
||||||
|
if trade.nr_of_successful_entries > 1:
|
||||||
|
# Reset fee_open_currency so fee checking can work
|
||||||
|
# Only necessary for additional entries
|
||||||
|
trade.fee_open_currency = None
|
||||||
# Don't cancel stoploss in recovery modes immediately
|
# Don't cancel stoploss in recovery modes immediately
|
||||||
trade = self.cancel_stoploss_on_exchange(trade)
|
trade = self.cancel_stoploss_on_exchange(trade)
|
||||||
trade.adjust_stop_loss(trade.open_rate, self.strategy.stoploss, initial=True)
|
trade.adjust_stop_loss(trade.open_rate, self.strategy.stoploss, initial=True)
|
||||||
@@ -2469,9 +2472,8 @@ class FreqtradeBot(LoggingMixin):
|
|||||||
order_amount = safe_value_fallback(order, "filled", "amount")
|
order_amount = safe_value_fallback(order, "filled", "amount")
|
||||||
# Only run for closed orders
|
# Only run for closed orders
|
||||||
if (
|
if (
|
||||||
trade.fee_updated(order.get("side", ""))
|
trade.fee_updated(order.get("side", "")) or order["status"] == "open"
|
||||||
or order["status"] == "open"
|
# or order_obj.ft_fee_base
|
||||||
or order_obj.ft_fee_base
|
|
||||||
):
|
):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user