Report the correct time issue
Report the correct time issue
19 Jan 2016, 03:52
Dear Spotware,
I am working on an indicator where it checks to see if the positive DI has crossed above the negative DI of the DirectionalMovementSystem indicator.
Based on the chart below, the cross happend at 22:00 but in my debug window ( ChartObjects.DrawText method) , its saying 1:00 which is not correct.
How do I determine the exact time and date during the indicator crossing happen.
Below is my code for your reference.
if (_dms.DIPlus.HasCrossedAbove(_dms.DIMinus.LastValue, 0)) { ChartObjects.DrawText("has crossed", xySpace(0, 3) + "Has crossed on " + MarketSeries.OpenTime[index], StaticPosition.TopCenter, Colors.White); }
Replies
mikepecson72
21 Jan 2016, 03:53
Dear Spotware,
The above code is using UTC +0 which I believe is the default server time in cAlgo.
@mikepecson72
Spotware
19 Jan 2016, 07:45
Dear Trader,
The MarketSeries.OpenTime returns the time in UTC+0. Could you please adjust your code to include the Timezone differences or change the Timezone set on cAlgo to UTC+0?
@Spotware