Fix a case where the amount was not recalculated. Added additional temporary logging.

This commit is contained in:
Reigo Reinmets
2021-12-16 22:57:56 +02:00
parent 337af44901
commit 462270bc5a
4 changed files with 40 additions and 11 deletions

View File

@@ -160,6 +160,10 @@ class StrategyTestV2(IStrategy):
current_rate: float, current_profit: float, **kwargs):
if current_profit < -0.0075:
for order in trade.orders:
if order.ft_is_open:
return None
return self.wallets.get_trade_stake_amount(pair, None)
return None