Here is a code snippet to find out how fast a code is executed.
Actually now I have to start some experiments. So, in order to make a plan before I will start, would like to ask, which formats have good potential for optimal read write dynamic array, including strings.
As far as I can see so far, TXT, CSV and JSON ar good candidates.
Instead of asking, experiment for yourself and find out!
If you will have to choose, which format would you prefer to read/write dynamic array including string, TXT, CSV or JSON as recommended by Dominik?
Packed binary is just binary data packed sequential in way that is not byte aligned to anything, so there is no space between data.
There are already examples in the documentation using packed binary data, such as the example at "FileWriteDouble()" or "FileWriteLong()".
Also, instead of your 2 dimensional array, create an array of a structure and simply use the FileWriteArray(), but remember to first output the size of the array, with FileWriteIntger(), so that you can dynamically adjust when reading it back.
EDIT: The array size is only needed in the case that you output other data to the file! If you only output the single array to it, then there is no need to save the size to the file as MQL will automatically adjust the size of a dynamic array for it when reading it. See the example FileReadArray().
Please enable the necessary setting in your browser, otherwise you will not be able to log in.