| | |
| | | log.warn("无效的价格格式: {}", orderPrice); |
| | | return; |
| | | } |
| | | // 删除比该价格大的数据(由于是降序队列,所以是删除value.compareTo(priceDecimal) < 0的元素) |
| | | queueKaiCang.removeIf(item -> item.getValue().compareTo(priceDecimal) <= 0); |
| | | // 删除比该价格大的数据 |
| | | queueKaiCang.removeIf(item -> item.getValue().compareTo(priceDecimal) >= 0); |
| | | // 打印开仓队列 |
| | | StringBuilder kaiCangStr = new StringBuilder(); |
| | | kaiCangStr.append("开仓队列: ["); |
| | |
| | | kaiCangStr.append("]"); |
| | | log.info(kaiCangStr.toString()); |
| | | |
| | | // 删除比该价格小的数据(由于是升序队列,所以是删除value.compareTo(priceDecimal) > 0的元素) |
| | | queuePingCang.removeIf(item -> item.getValue().compareTo(priceDecimal) >= 0); |
| | | // 删除比该价格小的数据 |
| | | queuePingCang.removeIf(item -> item.getValue().compareTo(priceDecimal) <= 0); |
| | | |
| | | // 打印平仓队列 |
| | | StringBuilder pingCangStr = new StringBuilder(); |