]> Piment Noir Git Repositories - freqai-strategies.git/commit
fix(quickadapter): preserve take-profit JSON history (#145)
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Tue, 28 Jul 2026 15:15:27 +0000 (17:15 +0200)
committerGitHub <noreply@github.com>
Tue, 28 Jul 2026 15:15:27 +0000 (17:15 +0200)
commit7dc50004f3f25e5099f7594dff14d08a7545c295
tree60234ec4d4b11df0819685690f7493b54e249e0b
parentba4ba4c6308bf2bc2be1dc8c0f759df412158db3
fix(quickadapter): preserve take-profit JSON history (#145)

* fix(quickadapter): preserve take-profit JSON history

* refactor(quickadapter): drop over-engineered take-profit history migration

Remove the history_v2 versioned key, its legacy-migration branches, the
scalar cd_type/JSON-string recovery paths and the getter write side effect.
The history custom-data row has only ever been written as a dict, so its
cd_type is always "dict" and those defensive branches are unreachable dead
code; a stored dict round-trips as a dict with list fields, and the shared
callback wrapper logs rather than silently swallows exceptions.

_get_trade_history reverts to the minimal reader keyed by the literal
"history", matching the other custom-data row keys in this file. The
take-profit JSON fix for #134 is preserved: the _TakeProfitHistoryEntry
alias keeps the list arm and safe_append_trade_take_profit_price still
accepts a two-element tuple or list with a non-bool int stage and non-bool
numeric price.
quickadapter/user_data/strategies/QuickAdapterV3.py