exchange.get_max_pair_stake_amount hard set leverage to 0
This commit is contained in:
@@ -417,7 +417,7 @@ class Backtesting:
|
||||
# TODO: Write tests
|
||||
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)
|
||||
max_stake = self.exchange.get_max_pair_stake_amount(trade.pair, row[OPEN_IDX])
|
||||
stake_available = self.wallets.get_available_stake_amount()
|
||||
stake_amount = strategy_safe_wrapper(self.strategy.adjust_trade_position,
|
||||
default_retval=None)(
|
||||
@@ -557,7 +557,7 @@ class Backtesting:
|
||||
propose_rate = min(max(propose_rate, row[LOW_IDX]), row[HIGH_IDX])
|
||||
|
||||
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)
|
||||
max_stake_amount = self.exchange.get_max_pair_stake_amount(pair, propose_rate)
|
||||
stake_available = self.wallets.get_available_stake_amount()
|
||||
|
||||
pos_adjust = trade is not None
|
||||
|
Reference in New Issue
Block a user