I would appreciate your help with solving the below issue.
For my strategy, I am trying to get the difference in numbers between the current bar and the bar that happened during specific time in the past, as below
int barsAgo = CurrentBar - Bars.GetBar(new DateTime(2006, 12, 18, 9, 0, 0));
int barsAgo = CurrentBars[1] - Bars.GetBars(new DateTime(2006, 12, 18, 9, 0, 0))[1];
Best,

Comment