Merge branch 'freqtrade:develop' into develop

This commit is contained in:
hippocritical 2023-05-28 12:11:29 +02:00 committed by GitHub
commit aa8eb14461
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
""" Freqtrade bot """
__version__ = '2023.5.dev'
__version__ = '2023.6.dev'
if 'dev' in __version__:
from pathlib import Path

View File

@ -74,7 +74,7 @@ class VolatilityFilter(IPairList):
needed_pairs: ListPairsWithTimeframes = [
(p, '1d', self._def_candletype) for p in pairlist if p not in self._pair_cache]
since_ms = dt_ts(dt_floor_day(dt_now()) - timedelta(days=self._days - 1))
since_ms = dt_ts(dt_floor_day(dt_now()) - timedelta(days=self._days))
# Get all candles
candles = {}
if needed_pairs:
@ -103,7 +103,7 @@ class VolatilityFilter(IPairList):
result = False
if daily_candles is not None and not daily_candles.empty:
returns = (np.log(daily_candles.close / daily_candles.close.shift(-1)))
returns = (np.log(daily_candles["close"].shift(1) / daily_candles["close"]))
returns.fillna(0, inplace=True)
volatility_series = returns.rolling(window=self._days).std() * np.sqrt(self._days)