Properly preserve trade's low during backtesting

This commit is contained in:
Matthias
2021-08-09 19:38:56 +02:00
parent 5bfb9edf02
commit cf27968b97
5 changed files with 14 additions and 9 deletions

View File

@@ -568,7 +568,7 @@ class IStrategy(ABC, HyperStrategyMixin):
current_rate = rate
current_profit = trade.calc_profit_ratio(current_rate)
trade.adjust_min_max_rates(high or current_rate)
trade.adjust_min_max_rates(high or current_rate, low or current_rate)
stoplossflag = self.stop_loss_reached(current_rate=current_rate, trade=trade,
current_time=date, current_profit=current_profit,