From 340c0ea391f4ac89b01352ff6d4fd947715a694b Mon Sep 17 00:00:00 2001 From: Italo <45588475+italodamato@users.noreply.github.com> Date: Thu, 14 Apr 2022 14:15:11 +0100 Subject: [PATCH] update is_random before asked_non_tried is_random depends on asked_non_tried and needs to be updated first --- freqtrade/optimize/hyperopt.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/freqtrade/optimize/hyperopt.py b/freqtrade/optimize/hyperopt.py index 24d2b910d..babcc5491 100644 --- a/freqtrade/optimize/hyperopt.py +++ b/freqtrade/optimize/hyperopt.py @@ -438,12 +438,12 @@ class Hyperopt: else: asked = unique_list(self.opt.space.rvs(n_samples=n_points * 5)) is_random = [True for _ in range(len(asked))] - asked_non_tried += [x for x in asked - if x not in self.opt.Xi - and x not in asked_non_tried] is_random += [rand for x, rand in zip(asked, is_random) if x not in self.opt.Xi and x not in asked_non_tried] + asked_non_tried += [x for x in asked + if x not in self.opt.Xi + and x not in asked_non_tried] i += 1 if asked_non_tried: