My understanding is, for example:
I am backtesting using CL 04-15 for period 01/01/15 till 03/11/15, which means, the price from:
01/01/15 - 01/16/15 is grab from front contract of that time (CL-02-15);
01/17/15 - 02/18/15 is grab from front contract of that time (CL-03-15);
02/19/15 - 03/11/15 is grab from front contract of that time (CL-04-15);
My question is, in OnBarUpdate() for daily bar on, ex: 13/01/15, how can I get the front contract instrument name, which is CL 02-15? Or, on 13/02/15 which is CL 03-15?
Thanks.
Comment