Package com.barchart.feed.base.values.api

Examples of com.barchart.feed.base.values.api.SizeValue


    final TimeValue date = message.getTradeDay().tradeDate();

    final DDF_ParamType.Kind kind = param.kind;

    final PriceValue price;
    final SizeValue size;

    switch (kind) {
    default:
     
    case SIZE:
View Full Code Here


  public Void visit(final DDF_MarketSession message, final MarketDo market) {

    // ### process session

    // TODO are these trade fields?
    final SizeValue sizeLast = message.getSizeLast();
    final TimeValue timeLast = message.getTimeLast();

    // ### process snapshot

    final DDF_MarketSnapshot snapshot = message;
View Full Code Here

      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);
View Full Code Here

    final PriceValue priceOpen = message.getPriceOpen();
    final PriceValue priceHigh = message.getPriceHigh();
    final PriceValue priceLow = message.getPriceLow();
    final PriceValue priceClose = message.getPriceLast(); // XXX note: LAST
    final PriceValue priceSettle = message.getPriceSettle();
    final SizeValue sizeVolume = message.getSizeVolume();
    final SizeValue sizeInterest = message.getSizeInterest();

    // apply

    applyBar(bar, MarketBarField.OPEN, priceOpen);
    applyBar(bar, MarketBarField.HIGH, priceHigh);
View Full Code Here

    case TRADE: {

      // message "27" : normal trade

      PriceValue price = message.getPrice();
      SizeValue size = message.getSize();

      // TODO review contract on how to clean partial values
      if (isClear(price) || isEmpty(price)) {
        price = ValueConst.NULL_PRICE;
        size = ValueConst.NULL_SIZE;
View Full Code Here

      case COMBINED:
        type = Book.Type.COMBINED;
        break;
      }

      final SizeValue size = LIMIT; // inst.get(BOOK_SIZE);
     
      // ValueConverter
      final PriceValue step = ValueBuilder.newPrice(
          instrument.tickSize().mantissa(),
          instrument.tickSize().exponent());
View Full Code Here

    } else {

      // ### volume

      final SizeValue volumeOld = bar.get(VOLUME);
      final SizeValue volumeNew = volumeOld.add(size);
      bar.set(VOLUME, volumeNew);
      eventAdd(NEW_VOLUME);

    }
View Full Code Here

        break;
      case COMBINED:
        type = Book.Type.COMBINED;
        break;
      }
      final SizeValue size = LIMIT;
      // TODO ValueConverter
      final Price tempStep = instrument.tickSize();
      final PriceValue step = ValueBuilder.newPrice(tempStep.mantissa(),
          tempStep.exponent());
View Full Code Here

      case COMBINED:
        type = Book.Type.COMBINED;
        break;
      }

      final SizeValue size = LIMIT; // inst.get(BOOK_SIZE);

      // ValueConverter
      final PriceValue step = ValueBuilder.newPrice(
          instrument.tickSize().mantissa(),
          instrument.tickSize().exponent());
View Full Code Here

    final TimeValue time = message.getTime();
    final TimeValue date = message.getTradeDay().tradeDate();
    final DDF_Session ddfSession = message.getSession();

    final PriceValue price;
    final SizeValue size;

    switch (param.kind) {

      default:
      case SIZE:
View Full Code Here

TOP

Related Classes of com.barchart.feed.base.values.api.SizeValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.