Skip to content

Commit

Permalink
bug fix: max_n_positions undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
enarjord committed Nov 7, 2024
1 parent 53eb607 commit c9b8b9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/passivbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c9b8b9d

Please sign in to comment.