Yes, In mql5 multidimensional arrays have limited functionality. For parallel arrays, use a structure to get the similar results to avoid headaches.
struct Multi_Array { double ATbuffer[]; double ATbufferTemporal[]; // do your copy things here }
You probably want to store the latest ATbuffer data in the ATbufferTemporal buffer? Tell me more about why, maybe I can offer alternatives...
Anyway, if speed is a priority and you still want to process parallel data doing this professionally, then copy the required volume first. then for running updates, update only the latest element in the ATbufferTemporal[] array so that before updating, throw away the oldest element. This way you always reallocate only two elements in your temp buffer, regardless the total size of buffer.
This solution is simple, effective and well known in data processing. If you want to investigate in more detail then google: Sliding Window, FIFO Queue or Circular Buffer (Ring Buffer).

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I want to have the results of several indicator buffers in a 2-dimensional array.
Problem: CopyBuffer and ArraySetAsSeries work with one dimension
The idea is to use a temporary array as series and then copy it into the 2-dimensional array, but I can't do it with ArrayCopy either since they are of different dimensions.
The solution to get out of this situation is to make a loop and copy value by value, but it is slow!
Any more efficient solution?
Thank you!!