mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
fix: max_stake_amount should not include leverage
This commit is contained in:
@@ -1243,7 +1243,7 @@ class LocalTrade:
|
|||||||
total_stake += self._calc_open_trade_value(tmp_amount, price)
|
total_stake += self._calc_open_trade_value(tmp_amount, price)
|
||||||
max_stake_amount += tmp_amount * price
|
max_stake_amount += tmp_amount * price
|
||||||
self.funding_fees = funding_fees
|
self.funding_fees = funding_fees
|
||||||
self.max_stake_amount = float(max_stake_amount)
|
self.max_stake_amount = float(max_stake_amount) / (self.leverage or 1.0)
|
||||||
|
|
||||||
if close_profit:
|
if close_profit:
|
||||||
self.close_profit = close_profit
|
self.close_profit = close_profit
|
||||||
|
|||||||
Reference in New Issue
Block a user