Hi.
Up until yesterday my code ran for a week or so with not problems. I forgot to extend it’s expiration date so today when I saw that I wanted to restart it. I then got a message saying, that “the historical data is insufficient to calculate at least one indicator” and to increase the number of preloaded bars using the DEFPARAM PRELOADBARS = X”.
As I said I never changed anything before it stopped working. The first part of my code looks like this:
// Definition of code parameters
DEFPARAM CumulateOrders = False // Cumulating positions deactivated
DEFPARAM PRELOADBARS=20000
After that comes the conditional parts of the code (what triggers an enter and exit position). I tried putting in a space on both sides of the equal sign. I also tried changing the number from 20000 to anything between 10000 and 200000. Nothing helped. I’m using version 10.3 and that didn’t change over the last couple of days.
Do you guys have any suggestions to what’s happened and how I can fix it?
What could’ve happened
Which instrument please? What indicator?
I am also having this issue as of recently.
I’m running on the Sa40 index.
Also tried various preload bars and workarounds but to no avail. It doesn’t seem to be linked to any one indicator.
I will continue testing tomorrow and update if I find the problem or a fix.
I’m not at my pc so will add some more I fo tomorrow.
Maximum of PRELOADBARS is 10.000 bars.
@Vicari0us
What is the maximum period of calculation you are using? Which indicator please?