for(int x=0; x<ArraySize(a); x++){ string n = IntegerToString(a[x]); filehandle = FileOpen(n, FILE_WRITE|FILE_CSV); FileClose(filehandle); } for(int y=0; y<ArraySize(b); y++){ FileDelete(IntegerToString(b[y])); }
StrToInteger("n") is wrong... you would need StrToInteger(n) to send the filename, but FileClose() needs filehandle not filename...
https://docs.mql4.com/function_indices
I suggest you read about the functions before using them...
List of MQL4 Functions - MQL4 Reference
- docs.mql4.com
Reads from the file of the CSV type a string of one of the formats: "YYYY.MM.DD HH:MM:SS", "YYYY.MM.DD" or "HH:MM:SS" - and converts it into a datetime value
Chad Magruder
thats it, thank you for your help :)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
hello
i have 2 arrays 1 to open files and 1 to delete it
but i have problem with the code
the result should be 11, 17, 15 file name exist and the other files should be deleted
can anyone tell me whats wrong?