correctly apply leverage to backtesting

This commit is contained in:
Matthias 2021-11-30 20:32:34 +01:00
parent bf8f1045ca
commit a2a974fc6d

View File

@ -490,7 +490,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,