Thanks for that Eugene, I had a chat with Vincent there, who is working with me on this. We just discussed the logic for comparing the next two contracts. Here's an example:
- JBT needs to know the correct contract for ES. - It calls a new method getMostLiquidContract(ES, 4, 3, 3), where: - 1st parameter indicates the symbol, - the 2nd is the number of contracts in a year (4), - and the 3rd is the first contract in a calendar year (3 (or March)). - From there we can get the next two contracts: Sept and Dec, and it's abstract enough to use for all symbols. - Once we're in Sept, it would start comparing the Dec and Mar (next year). We'd never be trading a Sept contract in Sept right? It'll always have expired by then. Let us know what you think. Hoping to have the code ready for next week. 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.
