public void tickSize(int tickerId, int field, int size) { TickType tick = TickType.get(field); consoleMsg( "tickSize:" + tickerId + " field:" + field + " (" + tick.field() + ") value:" + size); synchronized (m_mutex) { if (m_status == Status.Ticks) { switch (tick) { case BID_SIZE: m_bidSize = size; if (!(m_bidSize == 0 && m_bidPrice == -1)) { m_receivedTicks |= MaskBidSize; } break; case ASK_SIZE: m_askSize = size; if (!(m_askSize == 0 && m_askPrice == -1)) { m_receivedTicks |= MaskAskSize; } break; default: break; } checkReceivedAllTicks(); } } }
/////////////////////////////////////////////////////////////////////// // Data logging /////////////////////////////////////////////////////////////////////// public void tickPrice(int tickerId, int field, double price, int canAutoExecute) { Hashtable f = new Hashtable(); f.put(TickType.getField(field), String.valueOf(price)); f.put("canAutoExecute", String.valueOf(canAutoExecute)); EventBus.publish(new MktDataEvent(tickerId, f)); }
public void tickPrice(int tickerId, int field, double price, int canAutoExecute) { TickType tick = TickType.get(field); consoleMsg( "tickPrice:" + tickerId + " field:" + field + " (" + tick.field() + ") value:" + price); synchronized (m_mutex) { if (m_status == Status.Ticks) { switch (tick) { case BID: m_bidPrice = price; m_receivedTicks |= MaskBidPrice; break; case ASK: m_askPrice = price; m_receivedTicks |= MaskAskPrice; break; default: break; } checkReceivedAllTicks(); } } }
public void tickGeneric(int tickerId, int tickType, double value) { Hashtable f = new Hashtable(); f.put(TickType.getField(tickType), String.valueOf(value)); EventBus.publish(new MktDataEvent(tickerId, f)); }
public void tickString(int tickerId, int tickType, String value) { Hashtable f = new Hashtable(); f.put(TickType.getField(tickType), value); EventBus.publish(new MktDataEvent(tickerId, f)); }
public void tickSize(int tickerId, int field, int size) { Hashtable f = new Hashtable(); f.put(TickType.getField(field), String.valueOf(size)); EventBus.publish(new MktDataEvent(tickerId, f)); }