MarketSessions returning incorrect Sessions

algo-trader since: 20 Jan 2023;

  08 Mar 2023, 16:07
MarketSessions returning incorrect Sessions

Hi,

I'm trying to use the MarketSessions object to control the sessions that my cBot will trade but it is returning different information from the cTrader UI settings. The current market sessions displayed in cTrader are Frankfurt, London, New York which is correct at UTC 0 but the api is returning different timezone information (see screenshots). Also the time stamps in the log window are not in local time so I presume are using a different server time.

How do I get the correct MarketSessions data from the api?

Thanks.

Correct in cTrader UI

Correct in cTrader

Incorrect in cBot

Incorrect in cBot API

PanagiotisChar's avatar

PanagiotisChar since: 15 Sep 2022;

  09 Mar 2023, 09:12
Cofounder and Chief Technologist at Aieden Technologies

algo-trader since: 20 Jan 2023;

  09 Mar 2023, 14:22
RE:

PanagiotisChar said:

Hi there,

Can you share the cBot code?

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us

Hi,

I've sorted the issue now but thank you for your response.

firemyst since: 26 Mar 2019;

  15 Mar 2023, 04:26
RE: RE:

algo-trader said:

PanagiotisChar said:

Hi there,

Can you share the cBot code?

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us

Hi,

I've sorted the issue now but thank you for your response.

For future reference, are you able to post the solution on how you did it so if others have the same issue they know what to do?