Thanks, Michael. I looked at it yesterday, and in fact, much of the code
for this is already in place in the existing version of JBT. Specifically,
Trader.java has the tickSize() method, which fires in response to the
market data request (see socket.reqMktData(ticker, contract, "", false)
in TraderAssistant.java).
@Override
public void tickSize(int tickerId, int tickType, int size) {
try {
if (tickType == TickType.VOLUME && size != 0) {
MarketDepth marketDepth =
traderAssistant.getMarketBook(tickerId).getMarketDepth();
marketDepth.update(size);
}
} catch (Throwable t) {
// Do not allow exceptions come back to the socket -- it will
cause disconnects
eventReport.report(t);
}
}
This method fires whenever there is a volume update. So, what remains to be
done is the ability to request market data for any two nearby contracts,
and compare the session volume.
On Fri, Aug 23, 2013 at 10:12 AM, Mick O'Donnell <[email protected]>wrote:
> Thanks for clarifying Eugene. I'm working with another programmer on this
> and I'm keen to get going as I'll be away in September. I think we'll try
> the "compare the next two contracts" approach as you suggested, using the
> IB API to check their volume, and see how we get on. Seems like a good
> approach that should work across all the future symbols anyway. I'll put up
> the code by the end of the month. If anyone wants to help, we'd be happy to
> work with them.
>
> regards,
>
> Michael.
>
> --
> You received this message because you are subscribed to the Google Groups
> "JBookTrader" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/jbooktrader.
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
You received this message because you are subscribed to the Google Groups
"JBookTrader" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/jbooktrader.
For more options, visit https://groups.google.com/groups/opt_out.