How can I get London market hours?

Created at 14 Mar 2021, 10:50
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!
AN

anikaurmi420

Joined 18.10.2020

How can I get London market hours?
14 Mar 2021, 10:50


Hi Ctrader Community, I working on a strategy based on London Session. But London uses daylight saving time. For this reason, London Session has a different opening and closing time during winter and summer. In winter, London market hours are 8 am to 5 pm GMT. And In summer, London market hours are 7 am to 4 pm GMT. But I don't know the exact date for shifting the market hours. Does anyone know the exact date for shifting the time? Exactly from which date London Session shift 1 hour forward and from which date it's backward 1 hour time?

I tried to get market session data through CAlgo API. But unfortunately, CAlgo API currently doesn't provide market session data. I also try all the market session-related indicators freely available on the Ctrader website. But they also didn't solve the problem. Those indicators don't shift the time automatically. So my idea is if I know the exact date of the shifting time then I can code manually those market hours. So anyone knows? Exactly from which date London Session shift 1 hour forward and from which date it's backward 1 hour time?

Thank you.


@anikaurmi420
Replies

heinrich.munz
15 Mar 2021, 18:13 ( Updated at: 15 Mar 2021, 18:17 )

How can I get London market hours?

By changing the cBots meta data, the cBots time base (property "Time") can be changed to any time zone you like, including time zones doing daylight saving time correction automatically. So you could change the cBots time zone to London time like this:

namespace cAlgo.Robots
{
[Robot(TimeZone = TimeZones.GMTStandardTime, ...

 

Please note that all time zone names with the word "Standard" in it will lead to a daylight saving time correction.

 

And btw, cTrader does have a way to find out market session times. However, I experienced that they are not correct in the same way as they are not correct in the Trade Window of ctrader.

Example:

         for (int i = 0; i < Symbol.MarketHours.Sessions.Count; i++)
         {
            startDay[i] = Symbol.MarketHours.Sessions[i].StartDay;
            startTime[i] = Symbol.MarketHours.Sessions[i].StartTime;
            endDay[i] = Symbol.MarketHours.Sessions[i].EndDay;
            endTime[i] = Symbol.MarketHours.Sessions[i].EndTime;
         }

 

Hope this helps


@heinrich.munz