In my Initialize() I have
Add(PeriodType.Minute, 5);
But the BarsArray is not being loaded.
I've been trying to identify for some time exceptions that I have been getting whilst trying to access this array that occur intermittently, but I now have a situation where the error is occurring consistently.
I put a condition in my indicator now to test for BarsArray[1].Count>0 before attempting to access the array and I have discovered that BarsArray[1].Count=0, even after executing the above Add().
In this particular situation my instrument is FDAX and I am running my indicator during market closed time, but I am certain that there are other conditions which also cause this problem.
Why would the array not be loaded? Is there something I can do to force the load?
Thanks,
will.
Comment