Documentation on MQL5: Language Basics / Variables
Arrays
Array is the indexed sequence of identical-type data:
int a[50]; // One-dimensional array of 50 integers. double m[7][50]; // Two-dimensional array of seven arrays, // each of them consisting of 50 numbers. MyTime t[100]; // Array containing elements such as MyTimeOnly an integer can be an array index. No more than four-dimensional arrays are allowed. Numbering of array elements starts with 0. The last element of a one-dimensional array has the number which is 1 less than the array size. This means that call for the last element of an array consisting of 50 integers will appear as a[49]. The same concerns multidimensional arrays: A dimension is indexed from 0 to the dimension size-1. The last element of a two-dimensional array from the example will appear as m[6][49].
Documentation on MQL5: Language Basics / Variables
Arrays
Array is the indexed sequence of identical-type data:
Only an integer can be an array index. No more than four-dimensional arrays are allowed. Numbering of array elements starts with 0. The last element of a one-dimensional array has the number which is 1 less than the array size. This means that call for the last element of an array consisting of 50 integers will appear as a[49]. The same concerns multidimensional arrays: A dimension is indexed from 0 to the dimension size-1. The last element of a two-dimensional array from the example will appear as m[6][49].
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use