| | |
| | | if (itemService.isSuspended(symbol)) { |
| | | return; |
| | | } |
| | | Double currentValue = AdjustmentValueCache.getCurrentValue().get(symbol).doubleValue(); |
| | | BigDecimal adjustment = AdjustmentValueCache.getCurrentValue().get(symbol); |
| | | double currentValue = adjustment != null ? adjustment.doubleValue() : 0D; |
| | | double close = event.getTicker().getClose().doubleValue(); |
| | | double vol = event.getTicker().getVol().doubleValue(); |
| | | double amount = event.getTicker().getAmount().doubleValue(); |
| | |
| | | realtime.setVolume(new BigDecimal(vol)); |
| | | realtime.setAmount(new BigDecimal(amount)); |
| | | |
| | | if (currentValue != null && currentValue != 0) { |
| | | if (currentValue != 0) { |
| | | realtime.setClose(new BigDecimal(Arith.add(close, currentValue))); |
| | | //realtime.setVolume(new BigDecimal(Arith.add(vol, Arith.mul(Arith.div(currentValue, close), vol)))); |
| | | //realtime.setAmount(new BigDecimal(Arith.add(amount, Arith.mul(Arith.div(currentValue, close), amount)))); |