| | |
| | | private BigDecimal longStopLossPrice; |
| | | /** 空仓自定义止损触发价(价格涨至该值触发平空),null=未设置 */ |
| | | private BigDecimal shortStopLossPrice; |
| | | /** 止盈成交触发对向加仓开关:true=启用,false=禁用。null=未设置(默认false) */ |
| | | private Boolean tpTriggerOppositeAddEnabled; |
| | | /** 对向加仓挂单数量:止盈成交后在对向挂出的开仓张数,0=不启用 */ |
| | | private Integer tpTriggerOppositeAddQuantity; |
| | | |
| | | /** |
| | | * 从 GateConfig 构建 DTO(不暴露 apiSecret)。 |
| | |
| | | .dualStopLossEnabled(config.isDualStopLossEnabled()) |
| | | .longStopLossPrice(config.getLongStopLossPrice()) |
| | | .shortStopLossPrice(config.getShortStopLossPrice()) |
| | | .tpTriggerOppositeAddEnabled(config.isTpTriggerOppositeAddEnabled()) |
| | | .tpTriggerOppositeAddQuantity(config.getTpTriggerOppositeAddQuantity()) |
| | | .build(); |
| | | } |
| | | |
| | |
| | | m.put("dualStopLossEnabled", dualStopLossEnabled); |
| | | m.put("longStopLossPrice", longStopLossPrice); |
| | | m.put("shortStopLossPrice", shortStopLossPrice); |
| | | m.put("tpTriggerOppositeAddEnabled", tpTriggerOppositeAddEnabled); |
| | | m.put("tpTriggerOppositeAddQuantity", tpTriggerOppositeAddQuantity); |
| | | return m; |
| | | } |
| | | |
| | |
| | | .dualStopLossEnabled(false) |
| | | .longStopLossPrice(null) |
| | | .shortStopLossPrice(null) |
| | | .tpTriggerOppositeAddEnabled(false) |
| | | .tpTriggerOppositeAddQuantity(0) |
| | | .build(); |
| | | } |
| | | } |