Administrator
2026-08-03 b3d15904092ec5955937b4fec599b4cb234ebc14
多空本仓位的止盈比例
1 files modified
5 ■■■■■ changed files
src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java 5 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java
@@ -1330,6 +1330,7 @@
     * </ul>
     */
    private static final Map<Integer, int[]> STOP_LOSS_RULES = new LinkedHashMap<>();
    private static final int DEFAULT_STOP_LOSS_PERCENT = 5;
    static {
        // times  {满仓%, 阈值%}
@@ -1406,7 +1407,7 @@
            int selfPos = Math.max(queryPositionSize(Position.ModeEnum.DUAL_LONG), longPositionSize.intValue());
            int excess = selfPos - thresholdPosNum;
            if (excess > 0) {
                int perOrderQty = maxPos * 5 / 100;
                int perOrderQty = maxPos * DEFAULT_STOP_LOSS_PERCENT / 100;
                if (perOrderQty <= 0) {
                    perOrderQty = 1;
                }
@@ -1462,7 +1463,7 @@
            int selfPos = Math.max(queryPositionSize(Position.ModeEnum.DUAL_SHORT), shortPositionSize.intValue());
            int excess = selfPos - thresholdPosNum;
            if (excess > 0) {
                int perOrderQty = maxPos * 5 / 100;
                int perOrderQty = maxPos * DEFAULT_STOP_LOSS_PERCENT / 100;
                if (perOrderQty <= 0) {
                    perOrderQty = 1;
                }