Merge pull request #6011 from freqtrade/lev/backtesting

correctly apply leverage to backtesting
This commit is contained in:
Matthias
2021-12-01 19:49:40 +01:00
committed by GitHub
3 changed files with 25 additions and 1 deletions

View File

@@ -491,7 +491,7 @@ class Backtesting:
open_rate=row[OPEN_IDX],
open_date=current_time,
stake_amount=stake_amount,
amount=round(stake_amount / row[OPEN_IDX], 8),
amount=round((stake_amount / row[OPEN_IDX]) * leverage, 8),
fee_open=self.fee,
fee_close=self.fee,
is_open=True,