Array of arrays: invalid array access
I would like to use an array of arrays as in the following code
... But I get the error "invalid array access": how can I fix it?If you want to use an array of arrays as index buffers in an indicator, you may use IndBufArray.mqh from the algotrading book (look into the section describing "IndUnityPercent" indicator).
- www.mql5.com
SetIndexBuffer is not used that way, and doesn't support two-dimensional arrays
these kind of arrays are used to store values in rows and columns
double data[2][2]; int OnInit() { //--- data[0][0] = 1.1; data[0][1] = 1.2; data[1][0] = 2.1; data[1][1] = 2.2; Print("This array value: ", data[1][0]); //--- return(INIT_SUCCEEDED); }
I would like to use an array of arrays as in the following code
... But I get the error "invalid array access": how can I fix it?