From 60eca8b1f1de636d19b5e6d2c07f412c8c25e866 Mon Sep 17 00:00:00 2001 From: incrementby1 <91958753+incrementby1@users.noreply.github.com> Date: Mon, 29 Nov 2021 20:35:43 +0100 Subject: [PATCH] revert to random object --- freqtrade/plugins/pairlist/ShuffleFilter.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/freqtrade/plugins/pairlist/ShuffleFilter.py b/freqtrade/plugins/pairlist/ShuffleFilter.py index d0eff1b17..55cf9938f 100644 --- a/freqtrade/plugins/pairlist/ShuffleFilter.py +++ b/freqtrade/plugins/pairlist/ShuffleFilter.py @@ -28,6 +28,8 @@ class ShuffleFilter(IPairList): self._seed = pairlistconfig.get('seed') logger.info(f"Backtesting mode detected, applying seed value: {self._seed}") + self._random = random.Random(self._seed) + @property def needstickers(self) -> bool: """ @@ -53,7 +55,6 @@ class ShuffleFilter(IPairList): :return: new whitelist """ # Shuffle is done inplace - random.seed(self._seed) - random.shuffle(pairlist) + self._random.shuffle(pairlist) return pairlist