mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-14 04:03:55 +00:00
Merge pull request #4932 from freqtrade/fix/4920
Change rate back to "open" for custom_sell
This commit is contained in:
commit
3aaf06a3e2
|
@ -573,6 +573,10 @@ class IStrategy(ABC, HyperStrategyMixin):
|
||||||
|
|
||||||
sell_signal = SellType.NONE
|
sell_signal = SellType.NONE
|
||||||
custom_reason = ''
|
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)
|
if (ask_strategy.get('sell_profit_only', False)
|
||||||
and current_profit <= ask_strategy.get('sell_profit_offset', 0)):
|
and current_profit <= ask_strategy.get('sell_profit_offset', 0)):
|
||||||
# sell_profit_only and profit doesn't reach the offset - ignore sell signal
|
# sell_profit_only and profit doesn't reach the offset - ignore sell signal
|
||||||
|
|
Loading…
Reference in New Issue
Block a user