How to create a two-dimensional array and fill it with the product of the respective row index and column index
- Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes
- MT5 RAM memory voraciousness, problems with reading/writing large files
- Ordering Variables By Quantity?
int OrderArray[10,5];
Declared Globalscope
ArrayInitialize(OrderArray, // initialized array holder // value that will be set );
Maybe in init
void OpenWithArray() { for (int i=0;i<10;i++) { for (int j=0;j<5;j++) { OrderArray[i,j]= i*j; Print("Array content for ",i," and ",j," is ",OrderArray[i,j]); } } }
Thanks @GumRai, the program now works properly.
Next, I realize that each time I read from a file and close the file. The file becomes empty the next time I want to read or write to the file. What mechanism or function can I use to retain the content of the file in order to add to the existing content of the file or read the file again on the next opening of the file. I want the file to retain its content even when I restart the computer. Thank you in advance.
Thanks @GumRai, the program now works properly.
Next, I realize that each time I read from a file and close the file. The file becomes empty the next time I want to read or write to the file. What mechanism or function can I use to retain the content of the file in order to add to the existing content of the file or read the file again on the next opening of the file. I want the file to retain its content even when I restart the computer. Thank you in advance.
The file should not become empty if you are simply reading from it.
As this is not relevant to the thread title, I suggest that you open a new thread and post the code that you are having problems with.
I'm not so good at working with files, so if I can't help you, I am sure that somebody else will and we can both learn something :)

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use