Help me how to show range bar time for second time scale.
Help me how to show range bar time for second time scale.
04 May 2024, 13:48
I coding as below. It work well show previous period bar time by seconds. But problem is that can't show real time last index bar accumulation total seconds. When i try it with last bar index and compare with server time utc than indicator breaks work and show below code. Help me get trick for code. Best & Regards.
TimeSpan TimerA = Bars.OpenTimes.Last(0) - Bars.OpenTimes.Last(1);
if (TimerA.TotalSeconds < Save)
{
Green[index - 1] = TimerA.TotalSeconds;
}
if (TimerA.TotalSeconds > Save)
{
Red[index - 1] = TimerA.TotalSeconds;
}
PanagiotisCharalampous
05 May 2024, 15:30
Hi there,
I do not understand what the problem is with the specific code sample. Can you please share the complete cBot code so that we can reproduce it and explain to us how we can see this?
Best regards,
Panagiotis
@PanagiotisCharalampous