Fix for #7534 in backtesting

This commit is contained in:
Marek Cieplucha 2022-10-04 20:27:13 +02:00 committed by GitHub
parent c1d8ade2fa
commit 3264d7b890
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1045,7 +1045,7 @@ class Backtesting:
if requested_rate:
self._enter_trade(pair=trade.pair, row=row, trade=trade,
requested_rate=requested_rate,
requested_stake=(order.remaining * order.price),
requested_stake=(order.remaining * order.price / trade.leverage),
direction='short' if trade.is_short else 'long')
self.replaced_entry_orders += 1
else: