From 5779a78b50afb9a2bfeb7d6e256da3a1a48115a6 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Fri, 13 Nov 2026 17:16:28 +0800
Subject: [PATCH] refactor(station): 重构基础仓位止盈参数为总数量配置
---
src/main/resources/db/station-schema.sql | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/main/resources/db/station-schema.sql b/src/main/resources/db/station-schema.sql
index 9e5f9c9..67ae672 100644
--- a/src/main/resources/db/station-schema.sql
+++ b/src/main/resources/db/station-schema.sql
@@ -30,8 +30,7 @@
`tp_trigger_opposite_add_enabled` TINYINT(1) DEFAULT 0 COMMENT '止盈成交触发对向加仓开关',
`tp_trigger_opposite_add_quantity` INT(11) DEFAULT 0 COMMENT '对向加仓挂单数量',
`tp_position_replenish_enabled` TINYINT(1) DEFAULT 0 COMMENT '仓位止盈补仓开关',
- `base_take_profit_per_grid` VARCHAR(32) DEFAULT NULL COMMENT '单格止盈张数(基础仓位止盈,支持小数)',
- `base_take_profit_grid_count` INT(11) DEFAULT 0 COMMENT '止盈网格数量(基础仓位止盈)',
+ `base_take_profit_total_qty` INT(11) DEFAULT 0 COMMENT '原始仓位止盈总数量(平均分配到对手盘止损位前的所有网格,余数挂最后一格)',
`current_round` INT(11) DEFAULT 0 COMMENT '当前轮次',
`total_rounds` INT(11) DEFAULT 0 COMMENT '总轮数上限',
`accumulated_long_loss` INT(11) DEFAULT 0 COMMENT '多头累计止损次数',
@@ -112,11 +111,11 @@
ADD COLUMN `tp_trigger_opposite_add_quantity` INT(11) DEFAULT 0 COMMENT '对向加仓挂单数量' AFTER `tp_trigger_opposite_add_enabled`;
-- ============================================================
--- 升级脚本:基础仓位止盈挂单参数(2026-09 新增)
+-- 升级脚本:原始仓位止盈挂单优化(2026-11 变更)
+-- 原 base_take_profit_per_grid / base_take_profit_grid_count 弃用(旧列保留不删,新代码不再读取)
-- ============================================================
ALTER TABLE `strategy_status`
- ADD COLUMN `base_take_profit_per_grid` VARCHAR(32) DEFAULT NULL COMMENT '单格止盈张数(基础仓位止盈,支持小数)' AFTER `tp_trigger_opposite_add_quantity`,
- ADD COLUMN `base_take_profit_grid_count` INT(11) DEFAULT 0 COMMENT '止盈网格数量(基础仓位止盈)' AFTER `base_take_profit_per_grid`;
+ ADD COLUMN `base_take_profit_total_qty` INT(11) DEFAULT 0 COMMENT '原始仓位止盈总数量(平均分配到对手盘止损位前的所有网格,余数挂最后一格)' AFTER `tp_position_replenish_enabled`;
-- ============================================================
-- 升级脚本:仓位止盈补仓开关(2026-10 新增)
--
Gitblit v1.9.1