From c9b8b9d53f7eddf3f9180a4b114c03b82d8d68c1 Mon Sep 17 00:00:00 2001 From: Eirik Narjord Date: Wed, 6 Nov 2024 23:31:38 -0500 Subject: [PATCH] bug fix: max_n_positions undefined --- src/passivbot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/passivbot.py b/src/passivbot.py index bc311ba1b..8259d9029 100644 --- a/src/passivbot.py +++ b/src/passivbot.py @@ -804,11 +804,11 @@ def get_filtered_coins(self, pside): self.warn_on_high_effective_min_cost(pside) # filter coins by relative volume and noisiness clip_pct = self.config["bot"][pside]["filter_relative_volume_clip_pct"] + max_n_positions = self.get_max_n_positions(pside) if clip_pct > 0.0: volumes = self.calc_volumes(pside, symbols=candidates) # filter by relative volume n_eligible = round(len(volumes) * (1 - clip_pct)) - max_n_positions = self.get_max_n_positions(pside) candidates = sorted(volumes, key=lambda x: volumes[x], reverse=True) candidates = candidates[: int(max(n_eligible, max_n_positions))] # ideal symbols are high noise symbols