MQL4 - automated forex trading   /  

Documentation

MQL4 Reference  Array functions  ArrayResize

 
Use the opportunities of
MQL5 in MetaTrader 5
Study the new MQL5 language
Study the new MQL5 language.
Reference is already available
int ArrayResize( void array[], int new_size)
Sets a new size for the first dimension. If executed successfully, it returns count of all elements contained in the array after resizing, otherwise, returns -1, and array is not resized.
Note: Array declared at a local level in a function and resized will remain unchanged after the function has completed its operation. After the function has been recalled, such array will have a size differing from the declared one.
Parameters:
array[]   -   Array to resize.
new_size   -   New size for the first dimension.
Sample:
double array1[][4];
int    element_count=ArrayResize(array1, 20);
// new size - 80 elements