I'm trying to Create a BAR TIMER for NT7 for Higher Time Frame Bars, Add(PeriodType.Custom5, period_HTF), Unirenko Bar Type.
I have tried the Following, to calculate the TimeSpan, to no avail, using Both CQG and Simulated Data Feeds:
TimeSpan dynamicTimerElapsedTimeTS_HTF = DateTime.Now - Bars.GetTime(CurrentBars[1] -1);
TimeSpan dynamicTimerElapsedTimeTS_HTF = BarsArray[1].GetBar(Times[1][1]) - BarsArray[1].GetBar(Times[0][0]);
TimeSpan dynamicTimerElapsedTimeTS_HTF = Bars.GetTime(BarsArray[1].GetBar(Times[1][1])) - Bars.GetTime(BarsArray[1].GetBar(Times[0][0]));
Could you please help me figure this part out?
Thank You in Advance...
Joe
P.S. This works for a Lower Chart Time Frame TIMER:
TimeSpan dynamicTimerElapsedTimeTS_LTF = DateTime.Now - Bars.GetTime(CurrentBar -1);
Comment