fix(trend): correct DCA triggers and partial-position PnL across exchanges

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-07 17:09:22 +08:00
parent 9257a8051f
commit 84abf7e7f7
5 changed files with 122 additions and 265 deletions
+3 -3
View File
@@ -4,10 +4,10 @@
适用:gate_bot 等在计划结束(止盈/止损/手动)时因 strategy_trend_cfg 未注册而漏写快照的历史数据。
保本移交路径通常已有快照,本脚本默认跳过「已有任意快照」的计划。
用法(在仓库根目录):
python scripts/backfill_trend_strategy_snapshots.py \\
用法(在仓库根目录Linux 请用 python3):
python3 scripts/backfill_trend_strategy_snapshots.py \\
--db crypto_monitor_gate_bot/crypto.db --dry-run
python scripts/backfill_trend_strategy_snapshots.py \\
python3 scripts/backfill_trend_strategy_snapshots.py \\
--db crypto_monitor_gate_bot/crypto.db --apply
"""
from __future__ import annotations