Rename stoploss_reached to ft_stoploss_reached

This commit is contained in:
Matthias
2023-02-13 20:08:54 +01:00
parent ce7d24f529
commit cdd324d0a9
3 changed files with 19 additions and 19 deletions

View File

@@ -1083,10 +1083,10 @@ class IStrategy(ABC, HyperStrategyMixin):
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=current_time,
current_profit=current_profit,
force_stoploss=force_stoploss, low=low, high=high)
stoplossflag = self.ft_stoploss_reached(current_rate=current_rate, trade=trade,
current_time=current_time,
current_profit=current_profit,
force_stoploss=force_stoploss, low=low, high=high)
# Set current rate to high for backtesting exits
current_rate = (low if trade.is_short else high) or rate
@@ -1204,10 +1204,10 @@ class IStrategy(ABC, HyperStrategyMixin):
trade.adjust_stop_loss(bound or current_rate, stop_loss_value)
def stop_loss_reached(self, current_rate: float, trade: Trade,
current_time: datetime, current_profit: float,
force_stoploss: float, low: Optional[float] = None,
high: Optional[float] = None) -> ExitCheckTuple:
def ft_stoploss_reached(self, current_rate: float, trade: Trade,
current_time: datetime, current_profit: float,
force_stoploss: float, low: Optional[float] = None,
high: Optional[float] = None) -> ExitCheckTuple:
"""
Based on current profit of the trade and configured (trailing) stoploss,
decides to exit or not