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

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


    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


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

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

    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

    if (sizeCombo == 0) {
      entry = null;
    } else {
      final int place = placeFromClue(clue);
      final PriceValue price = keyStep().mult(indexFromClue(clue));
      final SizeValue size = newSize(sizeCombo);
      entry = new DefBookEntry(RET_ACT, side(), RET_TYPE, place, price,
          size);
    }
    return entry;
  }
View Full Code Here

      throws ArithmeticException {
    if (entry == null) {
      safeSet(arrayDefault, clue, 0);
      safeSet(arrayImplied, clue, 0);
    } else {
      final SizeValue entrySize = entry.sizeValue();
      final int value;
      if (entrySize == null) {
        value = 0;
      } else {
        // assume can fit
        value = MathExtra.castLongToInt(entrySize.asLong());
      }
      safeSet(arrayFor(entry.type()), clue, value);
    }
    placeUpdate(clue);
  }
View Full Code Here

    for (int offset = 0; offset < size; offset++) {

      final int clue = clueFromOffset(offset);

      final SizeValue value;

      if (isEmpty(clue)) {
        value = ValueConst.NULL_SIZE;
      } else {
        value = ValueBuilder.newSize(sizeCombo(clue));
View Full Code Here

      final TimeValue time) {

    assert price != null;
    assert size != null;

    SizeValue volume = map.get(price);

    if (volume == null) {
      volume = size;
    } else {
      volume = volume.add(size);
    }

    map.put(price, volume);

    priceLast = price;
View Full Code Here

  public final DefCuvol freeze() {

    final SizeValue[] entries = entries();

    for (int k = 0; k < entries.length; k++) {
      SizeValue volume = entries[k];
      if (volume == null) {
        volume = ValueConst.NULL_SIZE;
      }
      entries[k] = volume.freeze();
    }

    final DefCuvol that = new DefCuvol(instrument, entries,
        priceFirst(), priceStep(), ValueConverter.time(timeLast),
        entryLast);
View Full Code Here

    final int size = map.size();

    final SizeValue[] entries = new SizeValue[size];

    for (int k = 0; k < size; k++) {
      SizeValue volume = map.get(k);
      if (volume == null) {
        volume = ValueConst.NULL_SIZE;
      } else {
        volume = volume.freeze();
      }
      entries[k] = volume;
    }

    return entries;
View Full Code Here

   
    if(map.size() == 0) {
      return MarketConst.NULL_CUVOL_ENTRY;
    }

    final SizeValue size = map.get(price);

    if (size == null) {
      return MarketConst.NULL_CUVOL_ENTRY;
    }
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.