Simplify volumepairlist footprint slightly
This commit is contained in:
@@ -62,16 +62,16 @@ class VolumePairList(IPairList):
|
|||||||
|
|
||||||
# get timeframe in minutes and seconds
|
# get timeframe in minutes and seconds
|
||||||
self._tf_in_min = timeframe_to_minutes(self._lookback_timeframe)
|
self._tf_in_min = timeframe_to_minutes(self._lookback_timeframe)
|
||||||
self._tf_in_sec = self._tf_in_min * 60
|
_tf_in_sec = self._tf_in_min * 60
|
||||||
|
|
||||||
# wether to use range lookback or not
|
# wether 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) & (self._lookback_period > 0)
|
||||||
|
|
||||||
if self._use_range & (self._refresh_period < self._tf_in_sec):
|
if self._use_range & (self._refresh_period < _tf_in_sec):
|
||||||
raise OperationalException(
|
raise OperationalException(
|
||||||
f'Refresh period of {self._refresh_period} seconds is smaller than one '
|
f'Refresh period of {self._refresh_period} seconds is smaller than one '
|
||||||
f'timeframe of {self._lookback_timeframe}. Please adjust refresh_period '
|
f'timeframe of {self._lookback_timeframe}. Please adjust refresh_period '
|
||||||
f'to at least {self._tf_in_sec} and restart the bot.'
|
f'to at least {_tf_in_sec} and restart the bot.'
|
||||||
)
|
)
|
||||||
|
|
||||||
if (not self._use_range and not (
|
if (not self._use_range and not (
|
||||||
|
|||||||
Reference in New Issue
Block a user