Change rate back to "open" for custom_sell

closes #4920
This commit is contained in:
Matthias 2021-05-14 07:18:10 +02:00
parent 09756e3007
commit 4bc018a456
1 changed files with 4 additions and 0 deletions

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