MarketSessions seems to display wrong values

Created at 25 Nov 2022, 19:41
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!
Waxy's avatar

Waxy

Joined 12.05.2015

MarketSessions seems to display wrong values
25 Nov 2022, 19:41


Hello Spotware,

A few details seem off with MarketSessions as I've tested, image provided below

1 - How is that some sessions Start and End at the same time? It doesn't really make sense.
2 - How is that for example Sydney and Tokyo start at the same time? I think Tokyo starts always before, as on some other sites is displayed (pic below).

Code Used:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using cAlgo.API;
using cAlgo.API.Collections;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;

namespace cAlgo.Robots
{
    [Robot(AccessRights = AccessRights.None)]
    public class NewcBot : Robot
    {
        protected override void OnStart()
        {
            MarketSessionsChanged += Algo_MarketSessionsChanged;
        }

        private void Algo_MarketSessionsChanged(MarketSessionChangedEventArgs obj)
        {
            Print($"Started {obj.NewSessions}");
            Print($"Ended {obj.PreviousSessions}");
            Print("---");
        }

        protected override void OnTick() { }

        protected override void OnStop() { }
    }
}

Hope this feedback is useful, else please clarify these results

Regards,


@Waxy