Indicator buffers: are they static, double buffered, when are they updated ?

 

I have some indicator problems, dunno how to describe it, its pretty confusing, been struggeling with this for over a week !

I have used up all line buffers (7 of them), and are using a good number of so called work arrays, these are arrays which are

linked to the indicator buffers using [ SetIndexBuffer ], these are not line buffers/arrays.

So, in the Start function, in the usual For-loop, I write data to these work arrays like this: ArrayTest[i] = x.

But when I later in the For-loop try to access the array, using the same index i, the data seems to not be there !

Have done several tests to figure this out but the results seems inconclusive and confusing...

Have had much better luck using static vars in this custom function, but this resulted in other problems, and anyhow

I have to have the data in arrays for later processing.


I wonder if these work arrays are written to the indicator buffers only after exiting the Start function ???

And do such work arrays/buffers behave notably different than the line buffers ?

Documentation on MQL5: Constants, Enumerations and Structures / Indicator Constants / Indicators Lines
Documentation on MQL5: Constants, Enumerations and Structures / Indicator Constants / Indicators Lines
  • www.mql5.com
Indicators Lines - Indicator Constants - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5