| | |
| | | log.info("[Gate] 远程参数已持久化"); |
| | | break; |
| | | |
| | | case "CANCEL_LONG_TP_SL": |
| | | strategy.cancelLongTakeProfitAndStopLoss(); |
| | | message = "已取消多仓止盈止损"; |
| | | log.info("[Gate] 远程取消多仓止盈止损"); |
| | | break; |
| | | |
| | | case "CANCEL_SHORT_TP_SL": |
| | | strategy.cancelShortTakeProfitAndStopLoss(); |
| | | message = "已取消空仓止盈止损"; |
| | | log.info("[Gate] 远程取消空仓止盈止损"); |
| | | break; |
| | | |
| | | case "REBUILD_LONG_TP_SL": |
| | | strategy.rebuildLongTakeProfitAndStopLoss(); |
| | | message = "已生成多仓止盈止损"; |
| | | log.info("[Gate] 远程生成多仓止盈止损"); |
| | | break; |
| | | |
| | | case "REBUILD_SHORT_TP_SL": |
| | | strategy.rebuildShortTakeProfitAndStopLoss(); |
| | | message = "已生成空仓止盈止损"; |
| | | log.info("[Gate] 远程生成空仓止盈止损"); |
| | | break; |
| | | |
| | | case "CLOSE_LONG": |
| | | strategy.closeLongPosition(); |
| | | message = "已提交多单平仓"; |
| | | log.info("[Gate] 远程多单平仓"); |
| | | break; |
| | | |
| | | case "CLOSE_SHORT": |
| | | strategy.closeShortPosition(); |
| | | message = "已提交空单平仓"; |
| | | log.info("[Gate] 远程空单平仓"); |
| | | break; |
| | | |
| | | default: |
| | | success = false; |
| | | message = "未知指令类型: " + cmd.getCommandType(); |