Hi
I do not know if I am doing something wrong here for that error to appear.
the error only appears on the s_Ma buffer "last line"
I do not know if I am doing something wrong here for that error to appear.
the error only appears on the s_Ma buffer "last line"
MQL5:
int x = Bars(pair.names[i], pair.periods[j]); //-- x --- amount of bars to process ------ int y = x-slow_iMa; //-- y --- amount of usable bars ---------- // ... some other code here int f_iMa_Handle = iMA(pair.names[i], pair.periods[j],fast_iMa,0,MODE_SMA,PRICE_CLOSE); int s_iMa_Handle = iMA(pair.names[i], pair.periods[j],slow_iMa,0,MODE_SMA,PRICE_CLOSE); if(CopyBuffer(f_iMa_Handle, 0, 0, y, f_Ma)<=0) Print("Error copying fast Ma ",GetLastError()); if(CopyBuffer(s_iMa_Handle, 1, 0, y, s_Ma)<=0) Print("Error copying slow Ma ",GetLastError());
Last edited by a moderator: