From 4bc018a4568c2dbd200875cba61fdd1534004190 Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 14 May 2021 07:18:10 +0200 Subject: [PATCH] Change rate back to "open" for custom_sell closes #4920 --- freqtrade/strategy/interface.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/freqtrade/strategy/interface.py b/freqtrade/strategy/interface.py index 7483abf6d..e2cde52eb 100644 --- a/freqtrade/strategy/interface.py +++ b/freqtrade/strategy/interface.py @@ -573,6 +573,10 @@ class IStrategy(ABC, HyperStrategyMixin): sell_signal = SellType.NONE custom_reason = '' + # use provided rate in backtesting, not high/low. + current_rate = rate + current_profit = trade.calc_profit_ratio(current_rate) + if (ask_strategy.get('sell_profit_only', False) and current_profit <= ask_strategy.get('sell_profit_offset', 0)): # sell_profit_only and profit doesn't reach the offset - ignore sell signal