moved max_stake_amount check for None to exchange.get_max_pair_stake_amount
This commit is contained in:
@@ -414,9 +414,6 @@ class Backtesting:
|
||||
current_profit = trade.calc_profit_ratio(row[OPEN_IDX])
|
||||
min_stake = self.exchange.get_min_pair_stake_amount(trade.pair, row[OPEN_IDX], -0.1)
|
||||
max_stake = self.exchange.get_max_pair_stake_amount(trade.pair, row[OPEN_IDX], -0.1)
|
||||
if max_stake is None:
|
||||
# * Should never be executed
|
||||
raise OperationalException(f'max_stake_amount is None for {trade}')
|
||||
stake_available = self.wallets.get_available_stake_amount()
|
||||
stake_amount = strategy_safe_wrapper(self.strategy.adjust_trade_position,
|
||||
default_retval=None)(
|
||||
@@ -557,9 +554,6 @@ class Backtesting:
|
||||
|
||||
min_stake_amount = self.exchange.get_min_pair_stake_amount(pair, propose_rate, -0.05) or 0
|
||||
max_stake_amount = self.exchange.get_max_pair_stake_amount(pair, propose_rate, -0.05) or 0
|
||||
if max_stake_amount is None:
|
||||
# * Should never be executed
|
||||
raise OperationalException(f'max_stake_amount is None for {trade}')
|
||||
stake_available = self.wallets.get_available_stake_amount()
|
||||
|
||||
pos_adjust = trade is not None
|
||||
|
Reference in New Issue
Block a user