diff --git a/freqtrade/plugins/pairlist/PercentChangePairList.py b/freqtrade/plugins/pairlist/PercentChangePairList.py index 3138856c8..b4386f6ac 100644 --- a/freqtrade/plugins/pairlist/PercentChangePairList.py +++ b/freqtrade/plugins/pairlist/PercentChangePairList.py @@ -53,7 +53,7 @@ class PercentChangePairList(IPairList): self._sort_direction: str | None = self._pairlistconfig.get("sort_direction", "desc") self._def_candletype = self._config["candle_type_def"] - if (self._lookback_days > 0) & (self._lookback_period > 0): + if (self._lookback_days > 0) and (self._lookback_period > 0): raise OperationalException( "Ambiguous configuration: lookback_days and lookback_period both set in pairlist " "config. Please set lookback_days only or lookback_period and lookback_timeframe " @@ -70,7 +70,7 @@ class PercentChangePairList(IPairList): _tf_in_sec = self._tf_in_min * 60 # whether to use range lookback or not - self._use_range = (self._tf_in_min > 0) & (self._lookback_period > 0) + self._use_range = (self._tf_in_min > 0) and (self._lookback_period > 0) if self._use_range & (self._refresh_period < _tf_in_sec): raise OperationalException( diff --git a/freqtrade/plugins/pairlist/VolumePairList.py b/freqtrade/plugins/pairlist/VolumePairList.py index 7d5ce3468..cfe911bc8 100644 --- a/freqtrade/plugins/pairlist/VolumePairList.py +++ b/freqtrade/plugins/pairlist/VolumePairList.py @@ -47,7 +47,7 @@ class VolumePairList(IPairList): self._lookback_period = self._pairlistconfig.get("lookback_period", 0) self._def_candletype = self._config["candle_type_def"] - if (self._lookback_days > 0) & (self._lookback_period > 0): + if (self._lookback_days > 0) and (self._lookback_period > 0): raise OperationalException( "Ambiguous configuration: lookback_days and lookback_period both set in pairlist " "config. Please set lookback_days only or lookback_period and lookback_timeframe " @@ -64,9 +64,9 @@ class VolumePairList(IPairList): _tf_in_sec = self._tf_in_min * 60 # whether to use range lookback or not - self._use_range = (self._tf_in_min > 0) & (self._lookback_period > 0) + self._use_range = (self._tf_in_min > 0) and (self._lookback_period > 0) - if self._use_range & (self._refresh_period < _tf_in_sec): + if self._use_range and (self._refresh_period < _tf_in_sec): raise OperationalException( f"Refresh period of {self._refresh_period} seconds is smaller than one " f"timeframe of {self._lookback_timeframe}. Please adjust refresh_period "