]> Piment Noir Git Repositories - freqai-strategies.git/commit
fix(quickadapter): honor unlimited trade sentinel (#184)
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Thu, 30 Jul 2026 19:19:51 +0000 (21:19 +0200)
committerGitHub <noreply@github.com>
Thu, 30 Jul 2026 19:19:51 +0000 (21:19 +0200)
commit93c5704fc8e4088e0df7ebb32a91927fd5c723cc
tree830f52a41f44db7ddb6a9ded4831b97172e294c4
parent1b190bbc34aee8177f8543e10a121415fca64576
fix(quickadapter): honor unlimited trade sentinel (#184)

* fix(quickadapter): honor unlimited trade sentinel

* refactor(quickadapter): unify unlimited trade sentinel detection

Consolidate the three divergent unlimited max_open_trades predicates into a
single _is_unlimited_open_trades helper, honoring both the raw -1 sentinel and
its runtime-normalized float("inf") form (matching Freqtrade's own
config_validation idiom).

Behavior is preserved for every schema-legal max_open_trades value (config
schema minimum is -1): the sole formal divergence is that max_open_trades < -1,
already rejected by Freqtrade at config load, is no longer treated as unlimited
by max_open_trades_per_side. Also makes the confirm_trade_entry guard reject
the +inf form explicitly instead of relying on IEEE finite >= inf semantics.

* refactor(quickadapter): harmonize unlimited max_open_trades helper

Rename _is_unlimited_open_trades to _is_unlimited_max_open_trades (and the
local flag) for terminological precision with max_open_trades and
max_open_trades_per_side, and widen its parameter annotation to int | float to
match the is_trade_duration_valid precedent. No behavior change.
quickadapter/user_data/strategies/QuickAdapterV3.py