| | |
| | | } |
| | | } |
| | | } |
| | | log.info("[Gate] 空队列:{}", shortPriceQueue); |
| | | log.info("[Gate] 原空队列:{}", shortPriceQueue); |
| | | if (matched.isEmpty()) { |
| | | log.info("[Gate] 空仓队列未触发, 当前价:{}", currentPrice); |
| | | return; |
| | |
| | | } |
| | | shortPriceQueue.sort(BigDecimal::compareTo); |
| | | |
| | | log.info("[Gate] 空队列:{}", shortPriceQueue); |
| | | log.info("[Gate] 现空队列:{}", shortPriceQueue); |
| | | } |
| | | |
| | | synchronized (longPriceQueue) { |
| | |
| | | while (longPriceQueue.size() > config.getGridQueueSize()) { |
| | | longPriceQueue.remove(longPriceQueue.size() - 1); |
| | | } |
| | | |
| | | log.info("[Gate] 多队列:{}", shortPriceQueue); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | log.info("[Gate] 多队列:{}", shortPriceQueue); |
| | | log.info("[Gate] 原多队列:{}", longPriceQueue); |
| | | if (matched.isEmpty()) { |
| | | log.info("[Gate] 多仓队列未触发, 当前价:{}", currentPrice); |
| | | return; |
| | |
| | | } |
| | | longPriceQueue.sort(BigDecimal::compareTo); |
| | | |
| | | log.info("[Gate] 多队列:{}", shortPriceQueue); |
| | | log.info("[Gate] 现多队列:{}", longPriceQueue); |
| | | } |
| | | |
| | | synchronized (shortPriceQueue) { |
| | |
| | | while (shortPriceQueue.size() > config.getGridQueueSize()) { |
| | | shortPriceQueue.remove(shortPriceQueue.size() - 1); |
| | | } |
| | | |
| | | log.info("[Gate] 空队列:{}", shortPriceQueue); |
| | | } |
| | | } |
| | | |