Report the correct time issue

Created at 19 Jan 2016, 03:52
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
MI

mikepecson72

Joined 15.01.2016

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);
            }

 

 


@mikepecson72
Replies

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

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
21 Jan 2016, 06:48

Dear Trader,

We can’t see any issues from the screenshot and the code snippet you have posted.

If you believe there is an issue, could you then please send us the simplest code that reproduces it and a full screenshot showing it.


@Spotware