From 13bc5c5d8fb7567402d02972e77d619186aa0b31 Mon Sep 17 00:00:00 2001 From: Reigo Reinmets Date: Thu, 13 Jan 2022 20:24:21 +0200 Subject: [PATCH] Fine, this does look better. --- freqtrade/optimize/backtesting.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/freqtrade/optimize/backtesting.py b/freqtrade/optimize/backtesting.py index ced716d18..754b46d81 100644 --- a/freqtrade/optimize/backtesting.py +++ b/freqtrade/optimize/backtesting.py @@ -473,13 +473,12 @@ class Backtesting: max_stake_amount = self.wallets.get_available_stake_amount() pos_adjust = trade is not None - if stake_amount is None: + if not pos_adjust: try: stake_amount = self.wallets.get_trade_stake_amount(pair, None) except DependencyException: return trade - if not pos_adjust: stake_amount = strategy_safe_wrapper(self.strategy.custom_stake_amount, default_retval=stake_amount)( pair=pair, current_time=row[DATE_IDX].to_pydatetime(), current_rate=propose_rate,