I have an indicator "BarTimes" attached which measures the time of each bar. (I use a lot of range and renko charts so time is helpful).
Wondering if anybody can assist with changing the code from measuring time to counting ticks.
This is the line of code I think I would be changing.
protected override void OnBarUpdate()
{
if (CurrentBar < 1)
return;
if (Bars.IsFirstBarOfSession)
{
BarTime[0] = 0;
}
else
{
BarTime[0] = (Time[0] - Time[1]).TotalSeconds;
}
}
Thank you for any help

Comment