Merge pull request #6425 from samgermain/stake-amount

leverage in trade.stake_amount calculation
This commit is contained in:
Matthias
2022-02-19 20:11:23 +01:00
committed by GitHub
2 changed files with 7 additions and 5 deletions

View File

@@ -1291,8 +1291,7 @@ class FreqtradeBot(LoggingMixin):
# * Check edge cases, we don't want to make leverage > 1.0 if we don't have to
# * (for leverage modes which aren't isolated futures)
# TODO-lev: The below calculation needs to include leverage ...
trade.stake_amount = trade.amount * trade.open_rate
trade.stake_amount = trade.amount * trade.open_rate / trade.leverage
self.update_trade_state(trade, trade.open_order_id, corder)
trade.open_order_id = None