* Intraday chart (e.g., Renko)
* Instrument of EMD 12-10 with default session template (which is CME US Futures RTH I believe)
* Merge policy is set for MergeBackAdjusted
I'm trying to determine the boolean logic to detect when we've rolled over to new contract within a continuous contract intraday chart that auto-merges many contracts per the merge policy setting. I want to detect this historically via the indicator if possible so I can see the precise first bar in my chart for a newly rolled over contract (e.g., in March, June, Sept, Dec for index type futures).
I've tried a couple of ideas - like Bars.TotalTicks or Bars.TickCount for the variable to check against but still no luck, for example:
if (Bars.TotalTicks > 1) //<---- Not sure of if expression here to detect rolled over contract //Found first bar of new contract that we've rolled over/merged into on this chart Print(String.Format("Rolled Over Contract Detected with {0} on TickCount {1}, Bar {2}, [{3}]", Instrument.FullName, Bars.TickCount, CurrentBar, Time[0]));
JD
Comment