Merge branch 'develop' into feat/short

This commit is contained in:
Matthias
2021-12-01 07:11:11 +01:00
34 changed files with 381 additions and 197 deletions

View File

@@ -5,6 +5,7 @@ import logging
import random
from typing import Any, Dict, List
from freqtrade.enums.runmode import RunMode
from freqtrade.plugins.pairlist.IPairList import IPairList
@@ -18,7 +19,15 @@ class ShuffleFilter(IPairList):
pairlist_pos: int) -> None:
super().__init__(exchange, pairlistmanager, config, pairlistconfig, pairlist_pos)
self._seed = pairlistconfig.get('seed')
# Apply seed in backtesting mode to get comparable results,
# but not in live modes to get a non-repeating order of pairs during live modes.
if config.get('runmode') in (RunMode.LIVE, RunMode.DRY_RUN):
self._seed = None
logger.info("Live mode detected, not applying seed.")
else:
self._seed = pairlistconfig.get('seed')
logger.info(f"Backtesting mode detected, applying seed value: {self._seed}")
self._random = random.Random(self._seed)
@property