From fbd91cd3f85dd4cf7af9916cfa373568c147dca9 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 3 Jul 2021 08:22:21 +0200 Subject: [PATCH] Improve formatting to avoid backslash newlines --- freqtrade/optimize/backtesting.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/freqtrade/optimize/backtesting.py b/freqtrade/optimize/backtesting.py index 0c63c4c14..7c6b7cbc3 100644 --- a/freqtrade/optimize/backtesting.py +++ b/freqtrade/optimize/backtesting.py @@ -229,10 +229,12 @@ class Backtesting: # pessimistic price movement, which is moving just enough to arm stoploss and # immediately going down to stop price. if sell.sell_type == SellType.TRAILING_STOP_LOSS and trade_dur == 0: - if not self.strategy.use_custom_stoploss and self.strategy.trailing_stop and \ - self.strategy.trailing_only_offset_is_reached and \ - self.strategy.trailing_stop_positive_offset is not None and \ - self.strategy.trailing_stop_positive: + if ( + not self.strategy.use_custom_stoploss and self.strategy.trailing_stop + and self.strategy.trailing_only_offset_is_reached + and self.strategy.trailing_stop_positive_offset is not None + and self.strategy.trailing_stop_positive + ): # Worst case: price reaches stop_positive_offset and dives down. stop_rate = (sell_row[OPEN_IDX] * (1 + abs(self.strategy.trailing_stop_positive_offset) -