-
Everything you posted is irrevalent. Nothing to do with reading from a file.
-
Perhaps you should read the manual. FileOpen and FileReadDatetime
How To Ask Questions The Smart Way. (2004)
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up.
No free help (2017)
Or pay someone. Top of every page is the link Freelance.
Hiring to write script - General - MQL5 programming forum (2018)
We're not going to code it for you (although it could happen if you are lucky or the problem is interesting).
No free help (2017)
I am tried this code to get file arraysize but the value is always =0 .
int arr[]; string Text; string terminal_data_path=TerminalInfoString(TERMINAL_DATA_PATH); int FileHandle= FileOpen("DataFile.txt", FILE_CSV|FILE_READ|FILE_WRITE); if(FileHandle!=INVALID_HANDLE) { FileReadArray(FileHandle,arr); int size=ArraySize(arr); for(int i=0;i<size;i++) Text = (string) FileReadString(FileHandle,arr[i]); PrintFormat("Total Arrays in File: ",Text); FileClose(FileHandle); Print("File Array Size",size); // its always says 0 but in the file have data. }
it is not getting file string & not the arraysize Arraysize means how many lines are present in my DataFile.txt
i just want to get all lines from my file in array[]
such as
string result[] = {"line_1","Line_2","Line_3","Line_4"};
the result array get Line_1,Line_2 etc from the file.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello, i need a very simple code to get data from file. in the file have some data in lines.
Example:
2021.01.01 01:00:00
2022.01.02 01:00:00
2023.01.03 01:00:00
2024.01.04 01:00:00
2025.01.05 01:00:00
i am using this method with manual.
so now i want to get my file time list in to array veriable list[].