Add fill_leverage_brackets and get_max_leverage back in

This commit is contained in:
Sam Germain
2021-10-23 22:01:44 -06:00
parent d99e0dac7b
commit 60478cb213
5 changed files with 27 additions and 51 deletions

View File

@@ -707,7 +707,6 @@ class LocalTrade():
return float(self._calc_base_close(amount, rate, fee) - total_interest)
elif (trading_mode == TradingMode.FUTURES):
self.add_funding_fees()
funding_fees = self.funding_fees or 0.0
if self.is_short:
return float(self._calc_base_close(amount, rate, fee)) - funding_fees
@@ -789,19 +788,6 @@ class LocalTrade():
else:
return None
def add_funding_fees(self):
if self.trading_mode == TradingMode.FUTURES:
# TODO-lev: Calculate this correctly and add it
# if self.config['runmode'].value in ('backtest', 'hyperopt'):
# self.funding_fees = getattr(Exchange, self.exchange).calculate_funding_fees(
# self.exchange,
# self.pair,
# self.amount,
# self.open_date_utc,
# self.close_date_utc
# )
return
@staticmethod
def get_trades_proxy(*, pair: str = None, is_open: bool = None,
open_date: datetime = None, close_date: datetime = None,