Add "full partial exit" logic to backtesting

This commit is contained in:
Matthias
2023-12-14 20:08:03 +01:00
parent e96f4f0e53
commit bb2024f789

View File

@@ -572,7 +572,7 @@ class Backtesting:
# This is currently ineffective as remaining would become < min tradable
amount = trade.amount
remaining = (trade.amount - amount) * current_rate
if remaining < min_stake:
if 0 < remaining < min_stake:
# Remaining stake is too low to be sold.
return trade
exit_ = ExitCheckTuple(ExitType.PARTIAL_EXIT)