| | |
| | | private Boolean tpPositionReplenishEnabled; |
| | | /** 原始仓位止盈总数量:平均分配到对手盘止损位前的所有网格,余数挂最后一格,每格至少1张,0=不启用 */ |
| | | private Integer baseTakeProfitTotalQty; |
| | | /** 原始仓位减仓递减步长:0=关闭,>0=每次止损后追单量递减的步长,默认 0 */ |
| | | private Integer originalPositionReduce; |
| | | |
| | | /** |
| | | * 从 GateConfig 构建 DTO(不暴露 apiSecret)。 |
| | |
| | | .tpTriggerOppositeAddQuantity(config.getTpTriggerOppositeAddQuantity()) |
| | | .tpPositionReplenishEnabled(config.isTpPositionReplenishEnabled()) |
| | | .baseTakeProfitTotalQty(config.getBaseTakeProfitTotalQty()) |
| | | .originalPositionReduce(config.getOriginalPositionReduce()) |
| | | .build(); |
| | | } |
| | | |
| | |
| | | m.put("tpTriggerOppositeAddQuantity", tpTriggerOppositeAddQuantity); |
| | | m.put("tpPositionReplenishEnabled", tpPositionReplenishEnabled); |
| | | m.put("baseTakeProfitTotalQty", baseTakeProfitTotalQty); |
| | | m.put("originalPositionReduce", originalPositionReduce); |
| | | return m; |
| | | } |
| | | |
| | |
| | | .tpTriggerOppositeAddQuantity(0) |
| | | .tpPositionReplenishEnabled(false) |
| | | .baseTakeProfitTotalQty(0) |
| | | .originalPositionReduce(0) |
| | | .build(); |
| | | } |
| | | } |