Fix 2 bugs in ROI calculation

This commit is contained in:
Matthias
2022-03-16 19:50:25 +01:00
parent 298797cbfd
commit a89c1da19f
2 changed files with 2 additions and 2 deletions

View File

@@ -869,7 +869,7 @@ class IStrategy(ABC, HyperStrategyMixin):
force_stoploss=force_stoploss, low=low, high=high)
# Set current rate to high for backtesting sell
current_rate = high or rate
current_rate = (low if trade.is_short else high) or rate
current_profit = trade.calc_profit_ratio(current_rate)
# if enter signal and ignore_roi is set, we don't need to evaluate min_roi.