The term in my EA 'if(CopyBuffer(handle,1,0,10,zm)<0)' works as expected and returns valid array variables.
When I attempt to shift the plot in my custom indicator using 'PlotIndexSetInteger(1,PLOT_SHIFT,10)' to show a future prediction, the term in my EA returns unitialised array values.
Any ideas how to resolve this other than by having a second array which is not shifted.
Read this topic https://www.mql5.com/en/docs/series/copybuffer
On error function CopyBuffer will return -1 and set LastError is not zero value.
It is small positive example for you
if(h1!=INVALID_HANDLE && h2!=INVALID_HANDLE)