GO TO DATE

Created at 24 Oct 2020, 22:55
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!
RI

RICHSTOX

Joined 23.12.2018

GO TO DATE
24 Oct 2020, 22:55


It will be great to have option "GO TO DATE" to move chart back in time. Now its is possible only by moving mouse.


cTrader
@RICHSTOX
Replies

cranmer767
01 Nov 2020, 17:49

RE:

richardkurta said:

It will be great to have option "GO TO DATE" to move chart back in time. Now its is possible only by moving mouse.

 

I definitely agree and support this simple request. Most quality trading and software packages offer this feature yet cTrader/Spotware seem incapable or indifferent to offering it despite all the requests.


@cranmer767

PanagiotisCharalampous
02 Nov 2020, 08:31

Hi cranmer767,

This functionality can be easily coded by the community. See a cBot example below

using System;
using System.Linq;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class ScrollTo : Robot
    {
        [Parameter(DefaultValue = 2014)]
        public int Year { get; set; }

        [Parameter(DefaultValue = 1)]
        public int Month { get; set; }

        [Parameter(DefaultValue = 1)]
        public int Day { get; set; }

        protected override void OnStart()
        {
            var date = new DateTime(Year, Month, Day);

            while (Bars.OpenTimes[0] > date)
                Bars.LoadMoreHistory();
            Chart.ScrollXTo(date);
        }

        protected override void OnTick()
        {
            // Put your core logic here
        }

        protected override void OnStop()
        {
            // Put your deinitialization logic here
        }
    }
}

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

cranmer767
05 Nov 2020, 15:15

RE:

PanagiotisCharalampous said:

Hi cranmer767,

This functionality can be easily coded by the community. See a cBot example below

using System;
using System.Linq;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class ScrollTo : Robot
    {
        [Parameter(DefaultValue = 2014)]
        public int Year { get; set; }

        [Parameter(DefaultValue = 1)]
        public int Month { get; set; }

        [Parameter(DefaultValue = 1)]
        public int Day { get; set; }

        protected override void OnStart()
        {
            var date = new DateTime(Year, Month, Day);

            while (Bars.OpenTimes[0] > date)
                Bars.LoadMoreHistory();
            Chart.ScrollXTo(date);
        }

        protected override void OnTick()
        {
            // Put your core logic here
        }

        protected override void OnStop()
        {
            // Put your deinitialization logic here
        }
    }
}

Best Regards,

Panagiotis 

Join us on Telegram

Hi Panagiotis,

Many thanks for the reply. Would prefer that it was available on current charts.

Best regards,

Carr


@cranmer767

guspiccinini
22 May 2021, 17:51

Now that cTrader has added the 'Smart Chart Search' it would be easy to implement there. Just type the date in a predetermined format (i.e. 24-03-21) and the active chart should jump to that location. 

Something easy to program and a feature that should be embedded in the platform. 


@guspiccinini