MarketSessions returning incorrect Sessions

Created at 08 Mar 2023, 16:07
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!
AL

algo-trader

Joined 20.01.2023

MarketSessions returning incorrect Sessions
08 Mar 2023, 16:07


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


@algo-trader
Replies

algo-trader
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.


@algo-trader

firemyst
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?

 

 


@firemyst