修复 scale-in 后 leg.EntryPrice 不更新 + 重启恢复时加载 scale prices
- trader.go: scale-in 后用 weightedAvgPrice 更新 LongLeg/ShortLeg.EntryPrice - trader.go: restoreOpenPositions 从 orders 表加载 scale prices 重建完整价格切片 - db/trade_repo.go: 新增 GetScalePrices(tradeID) 方法 - README: v1.2.1 版本记录
This commit is contained in:
@@ -103,7 +103,13 @@ SQLite (`data/trades.db`),三张核心表:
|
||||
|
||||
## 版本历史
|
||||
|
||||
### v1.2 (当前)
|
||||
### v1.2.1 (当前)
|
||||
- ✨ scale-in 后 leg.EntryPrice 更新为加权平均(`weightedAvgPrice`)
|
||||
- ✨ 进程重启恢复仓位时,从 `orders` 表加载 scale prices,重建完整价格切片
|
||||
- ✨ 新增 `GetScalePrices()` DB 方法
|
||||
- 见 v1.2:
|
||||
|
||||
### v1.2
|
||||
- ✨ `system_orders` 表,记录系统级开仓/加仓/平仓
|
||||
- ✨ 手续费改为逐笔累加 USD,不再用百分比估算
|
||||
- ✨ Vite + React 前端,支持热加载
|
||||
|
||||
Reference in New Issue
Block a user