| | |
| | | private int maxPositionPerSide; |
| | | /** 加仓启动阈值:前N次止损不触发加仓,默认 1 */ |
| | | private int addPositionStartThreshold; |
| | | /** 超额止盈开关:true=挂单成交后将超出基础仓位的部分挂止盈单,默认 false */ |
| | | private boolean placeExcessTakeProfit; |
| | | /** 止盈挂单模式:off=关闭 / concentrated=集中止盈 / dispersed=分散止盈,默认 off */ |
| | | private String placeExcessTakeProfit; |
| | | |
| | | /** |
| | | * 从 GateConfig 构建 DTO(不暴露 apiSecret)。 |
| | |
| | | .addPositionQuantity(config.getAddPositionQuantity()) |
| | | .maxPositionPerSide(config.getMaxPositionPerSide()) |
| | | .addPositionStartThreshold(config.getAddPositionStartThreshold()) |
| | | .placeExcessTakeProfit(config.isPlaceExcessTakeProfit()) |
| | | .placeExcessTakeProfit(config.getPlaceExcessTakeProfit()) |
| | | .build(); |
| | | } |
| | | |
| | |
| | | .priceScale(1) |
| | | .contractMultiplier(new BigDecimal("0.001")) |
| | | .unrealizedPnlPriceMode("LAST_PRICE") |
| | | .isProduction(true) |
| | | .isProduction(false) |
| | | .priceDriveEnabled(true) |
| | | .rounds(0) |
| | | .stopLossCountMode("dual") |
| | |
| | | .addPositionQuantity(1) |
| | | .maxPositionPerSide(0) |
| | | .addPositionStartThreshold(1) |
| | | .placeExcessTakeProfit(false) |
| | | .placeExcessTakeProfit("off") |
| | | .build(); |
| | | } |
| | | } |