Package com.barchart.feed.base.book.api

Examples of com.barchart.feed.base.book.api.MarketBookEntry


  }

  @Override
  public final MarketBookEntry top(final Book.Side side) {

    final MarketBookEntry entry;
    switch (side) {
    case BID:
      entry = topBid;
      break;
    case ASK:
View Full Code Here


    for (int k = 0; k < maxDepth; k++) {

      final int bidsOffset = maxDepth - k - 1;
      final int asksOffset = k;

      final MarketBookEntry bidEntry;
      if (k < bidDepth) {
        bidEntry = bids[bidsOffset];
      } else {
        bidEntry = NULL_BOOK_ENTRY;
      }

      final MarketBookEntry askEntry;
      if (k < askDepth) {
        askEntry = asks[asksOffset];
      } else {
        askEntry = NULL_BOOK_ENTRY;
      }
View Full Code Here

  }

  @Override
  public Top top() {
   
    final MarketBookEntry bid;
    if(bidTop == null || bidTop.isNull()) {
      bid = NULL_BOOK_ENTRY;
    } else {
      bid = bidTop;
    }
   
    final MarketBookEntry ask;
    if(askTop == null || askTop.isNull()) {
      ask = NULL_BOOK_ENTRY;
    } else {
      ask = askTop;
    }
View Full Code Here

  }

  @Override
  public final MarketBookEntry top(final MarketBookSide side) {

    final MarketBookEntry entry;
    switch (side) {
    case BID:
      entry = topBid;
      break;
    case ASK:
View Full Code Here

              .append(value.get(MarketField.MARKET_TIME)
                  .asDateTime().toString());

          final MarketBookTop top = value.get(MarketField.BOOK_TOP);

          MarketBookEntry entry = top.side(MarketBookSide.ASK);

          if (!entry.isNull()) {
            sb.append(" ASK TOP").append(" price=")
                .append(ValueUtil.asDouble(entry.price()))
                .append(" qty=").append(entry.size().asLong());
          }

          entry = top.side(MarketBookSide.BID);

          if (!entry.isNull()) {
            sb.append(" BID TOP").append(" price=")
                .append(ValueUtil.asDouble(entry.price()))
                .append(" qty=").append(entry.size().asLong());
          }

          final MarketBar barCurrent = value
              .get(MarketField.BAR_CURRENT);
View Full Code Here

  }

  @Override
  public final MarketBookEntry top(final Book.Side side) {

    final MarketBookEntry entry;
    switch (side) {
    case BID:
      entry = topBid;
      break;
    case ASK:
View Full Code Here

  }

  @Override
  public final MarketBookEntry top(final Book.Side side) {

    final MarketBookEntry entry;
    switch (side) {
    case BID:
      entry = topBid;
      break;
    case ASK:
View Full Code Here

  }

  @Override
  public final MarketBookEntry top(final Book.Side side) {

    final MarketBookEntry entry;
    switch (side) {
    case BID:
      entry = topBid;
      break;
    case ASK:
View Full Code Here

    for (int k = 0; k < maxDepth; k++) {

      final int bidsOffset = maxDepth - k - 1;
      final int asksOffset = k;

      final MarketBookEntry bidEntry;
      if (k < bidDepth) {
        bidEntry = bids[bidsOffset];
      } else {
        bidEntry = NULL_BOOK_ENTRY;
      }

      final MarketBookEntry askEntry;
      if (k < askDepth) {
        askEntry = asks[asksOffset];
      } else {
        askEntry = NULL_BOOK_ENTRY;
      }
View Full Code Here

  }

  @Override
  public Top top() {
   
    final MarketBookEntry bid;
    if(bids.length == 0 || bids[0] == null || bids[0].isNull()) {
      bid = NULL_BOOK_ENTRY;
    } else {
      bid = bids[0];
    }
   
    final MarketBookEntry ask;
    if(asks.length == 0 || asks[0] == null || asks[0].isNull()) {
      ask = NULL_BOOK_ENTRY;
    } else {
      ask = asks[0];
    }
View Full Code Here

TOP

Related Classes of com.barchart.feed.base.book.api.MarketBookEntry

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.