​cTrader Desktop 4.6.2 bug - On backtesting MTF Range bars, the higher bars does not updated

Created at 28 Jan 2023, 16:27
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!
DA

​cTrader Desktop 4.6.2 bug - On backtesting MTF Range bars, the higher bars does not updated
28 Jan 2023, 16:27


I would like to report a bug.

cTrader version: 4.6.2.12995 (latest)

 cTrader Automate nuget package: 1.0.6 (latest)

Using below example cBot, you can see that in case of BackTest on Range20 OpenPrices from server option, the higher timeframe bars does not update!
But if you run BackTest on Tickdata from server, then everything is correct.


using cAlgo.API;
using cAlgo.API.Internals;
using System;

namespace cAlgo.Robots
{
    [Robot(AccessRights = AccessRights.None)]
    public class NewcBot : Robot
    {
        [Parameter("Current Chart TimeFrame", DefaultValue = "Ra20")]
        public TimeFrame TF_1 { get; set; }

        [Parameter("Higher TimeFrame", DefaultValue = "Ra200")]
        public TimeFrame TF_2 { get; set; }

        private Bars _currentChartBars, _higherTimeFrameChartBars;
        protected override void OnStart()
        {
            _currentChartBars = MarketData.GetBars(TF_1);
            _higherTimeFrameChartBars = MarketData.GetBars(TF_2);
        }

        protected override void OnBar()
        {
            if (Bars.LastBar.OpenTime > new DateTime(2023, 1, 27, 12, 0, 0)
                && Bars.LastBar.OpenTime < new DateTime(2023, 1, 27, 16, 0, 0))
            {
                // This is the current chart timeframe which is Range20. This is always right.
                Print("Range 20: " + _currentChartBars.LastBar.OpenTime.ToString("yyyy-MM-dd HH:mm:ss.fff"));

                // This is the higher timeframe
                // Wrong --> when used with Range20 openprices from server option. (Note that this is higher timeframe and not chart timeframe.)
                // Right --> when used with EveryTick from server option.
                Print("Range 200: " + _higherTimeFrameChartBars.LastBar.OpenTime.ToString("yyyy-MM-dd HH:mm:ss.fff"));
            }
        }
    }
}

 


@dave.anderson.consulting
Replies

Spotware
30 Jan 2023, 16:42

Dear trader, 

Thank you for reporting this problem. It will be solved in an upcoming update.

Best regards,

cTrader Team


@Spotware

dave.anderson.consulting
10 Feb 2023, 13:47

Dear cTrader Team,

I checked with latest update and saw that the issue is not resolved in 4.6.3 version.

How will you announce when this is fixed? Are you going to reply on this message or is there another way of letting know this is resolved?

Regards,

Dave

 


@dave.anderson.consulting

dave.anderson.consulting
10 Feb 2023, 18:13

RE:

PanagiotisChar said:

Hi Dave,

They are posting release notes in Announcements

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us

 

Obviously I had already read that before I started writing a message here.
The problem is that the cTrader team may use a different wording than I've done here.

I hope they fix this issue in the next update.


@dave.anderson.consulting