UTC and clock change

Created at 26 Oct 2015, 15:20
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!
TR

TraderM

Joined 30.12.2012

UTC and clock change
26 Oct 2015, 15:20


Hi Everyone,

we have just had a clock change (from daylight saving time) so I have had to have a closer look at some of my robots which trade at defined times.

Here an example: a robot was set to trade at 09:00 UTC+2. After the time change it traded at 08:00. After setting the platform to UTC+1, it traded as expected at 09:00 "new time". So far, so good...however...

Having reset from UTC+2 (used until Friday 23.10.2015) to UTC+1 (used from today, 26.10.2015), the candles up until Friday are now labelled with a different time (09:00 is now 08:00). All trades which started at 09:00 are shown to have started at 08:00. This is clearly wrong - for me, they should be still labeled with the correct times (09:00). After all, the trades started at 09:00 last week and that hasn't changed.

This also has serious implications for backtesting. If backtesting through different "times" (daylight saving time or not), some trades will have been triggered at "08:00" some at "09:00".

The way I see it at the moment is that I have to backtest in several sections (daylight saving time or not daylight saving time) which will be a lot of work, particularly if backtesting over 3 years!

Does anyone have any ideas if there is a way to handle this?

Thanks!

TraderM

 

 

 

 

 

 


@TraderM
Replies

Spotware
29 Oct 2015, 11:07

Dear Trader,

Thank you for reporting it. We are aware of this and we will provide a solution in the future. Stay tuned. 


@Spotware

mike.challis
03 Mar 2016, 18:45

RE:

Spotware said:

Dear Trader,

Thank you for reporting it. We are aware of this and we will provide a solution in the future. Stay tuned. 

Hi,

It's now the 3rd March 2016.  Has the issue with backtesting and clock changes been resolved? 

Thanks,

Mike


@mike.challis

Spotware
04 Mar 2016, 12:52

Dear Trader,

It's not an issue, it's a design choice.

We will consider providing users with the ability to select if the time historical data should be shifted after the daylight saving or not in the future. However, we cannot provide you with an ETA. Stay tuned.

Additionally, you can post your ideas/suggestions to http://vote.spotware.com/


@Spotware

melser_studio
15 Mar 2016, 12:57

This post was removed by moderator.


sylwester.guzek
20 Nov 2022, 14:39

workaround using standard libraries
            //detect if DST is active
            DateTime dt = Bars.LastBar.OpenTime.Date;
            TimeZoneInfo tzi = TimeZoneInfo.FindSystemTimeZoneById("W. Europe Standard Time");
            bool isDST = tzi.IsDaylightSavingTime(dt);

            int correctionDST;
            if (isDST)
                correctionDST = 2;
            else
                correctionDST = 1;

 


@sylwester.guzek