From ceba4d6e9b10627fbec55e9a165e59d448ca4ac4 Mon Sep 17 00:00:00 2001 From: adriance Date: Tue, 15 Mar 2022 14:03:06 +0800 Subject: [PATCH] Remove meaningless code --- freqtrade/optimize/backtesting.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/freqtrade/optimize/backtesting.py b/freqtrade/optimize/backtesting.py index ea9850624..ac5d4e652 100644 --- a/freqtrade/optimize/backtesting.py +++ b/freqtrade/optimize/backtesting.py @@ -467,10 +467,7 @@ class Backtesting: # Use the maximum between close_rate and low as we # cannot sell outside of a candle. # Applies when a new ROI setting comes in place and the whole candle is above that. - if is_short: - return max(min(close_rate, sell_row[HIGH_IDX]), sell_row[LOW_IDX]) - else: - return min(max(close_rate, sell_row[LOW_IDX]), sell_row[HIGH_IDX]) + return min(max(close_rate, sell_row[LOW_IDX]), sell_row[HIGH_IDX]) else: # This should not be reached...