Fix naming in interface.py
This commit is contained in:
parent
1ab6773257
commit
cd11ba3489
@ -136,8 +136,7 @@ class IStrategy(ABC, HyperStrategyMixin):
|
|||||||
cls_method = getattr(self.__class__, attr_name)
|
cls_method = getattr(self.__class__, attr_name)
|
||||||
if not callable(cls_method):
|
if not callable(cls_method):
|
||||||
continue
|
continue
|
||||||
informative_data_list = getattr(
|
informative_data_list = getattr(cls_method, '_ft_informative', None)
|
||||||
cls_method, '_ft_informative', None)
|
|
||||||
if not isinstance(informative_data_list, list):
|
if not isinstance(informative_data_list, list):
|
||||||
# Type check is required because mocker would return a mock object that evaluates to
|
# Type check is required because mocker would return a mock object that evaluates to
|
||||||
# True, confusing this code.
|
# True, confusing this code.
|
||||||
@ -945,9 +944,9 @@ class IStrategy(ABC, HyperStrategyMixin):
|
|||||||
else:
|
else:
|
||||||
logger.warning("CustomStoploss function did not return valid stoploss")
|
logger.warning("CustomStoploss function did not return valid stoploss")
|
||||||
|
|
||||||
sl_lower_short = (trade.stop_loss < (low or current_rate) and not trade.is_short)
|
sl_lower_long = (trade.stop_loss < (low or current_rate) and not trade.is_short)
|
||||||
sl_higher_long = (trade.stop_loss > (high or current_rate) and trade.is_short)
|
sl_higher_short = (trade.stop_loss > (high or current_rate) and trade.is_short)
|
||||||
if self.trailing_stop and (sl_lower_short or sl_higher_long):
|
if self.trailing_stop and (sl_lower_long or sl_higher_short):
|
||||||
# trailing stoploss handling
|
# trailing stoploss handling
|
||||||
sl_offset = self.trailing_stop_positive_offset
|
sl_offset = self.trailing_stop_positive_offset
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user