final PriceValue priceOpen = message.getPriceOpen();
final PriceValue priceHigh = message.getPriceHigh();
final PriceValue priceLow = message.getPriceLow();
final PriceValue priceClose = message.getPriceLast(); // XXX
final PriceValue priceSettle = message.getPriceSettle();
final SizeValue sizeVolume = message.getSizeVolume();
applyBar(bar, MarketBarField.OPEN, priceOpen);
applyBar(bar, MarketBarField.HIGH, priceHigh);
applyBar(bar, MarketBarField.LOW, priceLow);
applyBar(bar, MarketBarField.CLOSE, priceClose);
applyBar(bar, MarketBarField.SETTLE, priceSettle);
applyBar(bar, MarketBarField.VOLUME, sizeVolume);
bar.set(MarketBarField.BAR_TIME, time);
market.setBar(type, bar);
}
/** Update PREVIOUS bar */
{
/* Update changed comonents */
market.setChange(Component.DEFAULT_PREVIOUS);
final MarketBarType type = PREVIOUS;
final MarketDoBar bar = market.loadBar(type.field);
final PriceValue priceOpen = message.getPriceOpen();
final PriceValue priceHigh = message.getPriceHigh();
final PriceValue priceLow = message.getPriceLow();
final PriceValue priceClose = message.getPriceLastPrevious();
final PriceValue priceSettle = message.getPriceSettle();
final SizeValue sizeVolume = message.getSizeVolumePrevious();
final SizeValue sizeInterest = message.getSizeInterest(); // XXX
applyBar(bar, MarketBarField.OPEN, priceOpen);
applyBar(bar, MarketBarField.HIGH, priceHigh);
applyBar(bar, MarketBarField.LOW, priceLow);
applyBar(bar, MarketBarField.CLOSE, priceClose);