]> Piment Noir Git Repositories - freqai-strategies.git/commit
fix(quickadapter): bound take-profit stage to filled take-profit exits
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 20 Jul 2026 19:44:08 +0000 (21:44 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 20 Jul 2026 20:33:37 +0000 (22:33 +0200)
commit6b4b6a7a7dcc4bac4d2f5e33941534192985e775
treebc24ea88a1c155da686c5e04bab31d58d6cfba52
parentfb8a6befd4129b886f21cf56aa0029f887286dd2
fix(quickadapter): bound take-profit stage to filled take-profit exits

Derive the take-profit stage from filled take-profit-tagged exit orders
clamped to the final full-exit stage, instead of nr_of_successful_exits
plus in-flight exit orders. This stops the stage index from overshooting
its maximum (e.g. take_profit_*_4 while the final stage is 3) when a
final exit order is in flight or a non-take-profit exit fills.

Guard custom_exit against re-issuing the final take-profit exit while an
order is open by returning None after the model-expiry and reversal
safety exits and before the take-profit stage computation, so safety
exits still fire while in-flight orders no longer trigger a duplicate
take-profit exit.
quickadapter/user_data/strategies/QuickAdapterV3.py