| | |
| | | } |
| | | } else { |
| | | if (longActive && state == StrategyState.ACTIVE) { |
| | | log.info("[Gate] 多仓持仓归零,重置策略"); |
| | | handlePositionZeroAndReset("多仓"); |
| | | // log.info("[Gate] 多仓持仓归零,重置策略"); |
| | | // handlePositionZeroAndReset("多仓"); |
| | | } |
| | | longActive = false; |
| | | longPositionSize = BigDecimal.ZERO; |
| | |
| | | } |
| | | } else { |
| | | if (shortActive && state == StrategyState.ACTIVE) { |
| | | log.info("[Gate] 空仓持仓归零,重置策略"); |
| | | handlePositionZeroAndReset("空仓"); |
| | | // log.info("[Gate] 空仓持仓归零,重置策略"); |
| | | // handlePositionZeroAndReset("空仓"); |
| | | } |
| | | shortActive = false; |
| | | shortPositionSize = BigDecimal.ZERO; |