diff --git a/freqtrade/strategy/interface.py b/freqtrade/strategy/interface.py index 4de37a95a..26efd74a9 100644 --- a/freqtrade/strategy/interface.py +++ b/freqtrade/strategy/interface.py @@ -1002,12 +1002,7 @@ class IStrategy(ABC, HyperStrategyMixin): # Make sure current_profit is calculated using high for backtesting. bound = low if trade.is_short else high bound_profit = current_profit if not bound else trade.calc_profit_ratio(bound) - from pprint import pformat - logger.info(pformat(trade.to_json())) - logger.info((self.trailing_only_offset_is_reached, - self.trailing_stop_positive, bound_profit, sl_offset)) - logger.debug(f"{trade.pair} - Using positive stoploss: {stop_loss_value} " - f"offset: {sl_offset:.4g} profit: {current_profit:.2%}") + # Don't update stoploss if trailing_only_offset_is_reached is true. if not (self.trailing_only_offset_is_reached and bound_profit < sl_offset): # Specific handling for trailing_stop_positive @@ -1098,8 +1093,8 @@ class IStrategy(ABC, HyperStrategyMixin): return strategy_safe_wrapper(time_method, default_retval=False)( - pair=trade.pair, trade=trade, order=order, - current_time=current_time) + pair=trade.pair, trade=trade, order=order, + current_time=current_time) def advise_all_indicators(self, data: Dict[str, DataFrame]) -> Dict[str, DataFrame]: """