Package com.barchart.util.values.api

Examples of com.barchart.util.values.api.SizeValue


    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


    } 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

    } 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

     if (book.isFrozen()) {
   
     final MarketInstrument inst = get(INSTRUMENT);
   
     final MarketBookType type = inst.get(BOOK_TYPE);
     final SizeValue size = LIMIT; // inst.get(BOOK_SIZE);
     final PriceValue step = inst.get(PRICE_STEP);
   
     final VarBook varBook = new VarBook(type, size, step);
     final VarBookLast varBookLast = new VarBookLast(varBook);
     final VarBookTop varBookTop = new VarBookTop(varBook);
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.size();
      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

  public final void add(final PriceValue price, final SizeValue size) {

    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

TOP

Related Classes of com.barchart.util.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.