mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Call funding fee calculation whenever a trade is closed
This commit is contained in:
parent
ef23f0fcba
commit
8964c138f1
|
@ -606,6 +606,8 @@ class Backtesting:
|
|||
"""
|
||||
if order and self._get_order_filled(order.ft_price, row):
|
||||
order.close_bt_order(current_date, trade)
|
||||
self._run_funding_fees(trade, current_date, force=True)
|
||||
|
||||
if not (order.ft_order_side == trade.exit_side and order.safe_amount == trade.amount):
|
||||
# trade is still open
|
||||
trade.set_liquidation_price(self.exchange.get_liquidation_price(
|
||||
|
|
Loading…
Reference in New Issue
Block a user