Merge pull request #4932 from freqtrade/fix/4920

Change rate back to "open" for custom_sell
This commit is contained in:
Matthias 2021-05-15 06:40:21 +02:00 committed by GitHub
commit 3aaf06a3e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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