Difference between Bars[index].OpenTime and Server.Time for an Indicator on Tick
Difference between Bars[index].OpenTime and Server.Time for an Indicator on Tick
02 Mar 2021, 20:35
In an indicator set to 1 Tick:
public override void Calculate(int i)
{
Print(Bars[i].OpenTime + "," + Server.Time);
}
Shouldn't the time be the same? Also, which time (OpenTime or Server.Time) is the one representing the tick time?
(I am using cTrader 3.8)
Replies
JeanPaul
03 Mar 2021, 13:25
( Updated at: 21 Dec 2023, 09:22 )
RE:
PanagiotisCharalampous said:
Hi JeanPaul,
It seems that you are comparing historical times with the current time. Server.Time always displays the current time so it should be aligned with the last bar only. See below
Best Regards,
Panagiotis
Thank you for the detailed reply.
@JeanPaul
PanagiotisCharalampous
03 Mar 2021, 10:48
Hi JeanPaul,
It seems that you are comparing historical times with the current time. Server.Time always displays the current time so it should be aligned with the last bar only. See below
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous