Bug when retrieving History from Indicator

Created at 08 Jun 2023, 09:00
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

Bug when retrieving History from Indicator
08 Jun 2023, 09:00


Hello Spotware,

I have the following bug which affects some programs, when I try to request Historical trades it throws me zero, despite I have many trades done historically.
 

using cAlgo.API;

namespace cAlgo;

[Indicator(AccessRights = AccessRights.None)]
public class NewIndicator : Indicator
{
    protected override void Initialize()
    {
        Print(History.Count);
    }

    public override void Calculate(int index)
    {
    }
}


This get's fixed somehow by going to the history tab and selecting All History

I think this should not be happening, History.Count should always retrieve all values regardless of what is selected in the user interface



Regards,


@Waxy