Hil,
I am having problem with file written EA as it seems like only a single line is written.
Is following code ok ?
And also why is file written by MT4 not visible in Win7 explorer ? Folder persmission issues (whch i just cannot figure out why ? )
Did you read the documentation ? Click me --> FileOpen() why would you expect more than one line ? are you trying to write a line and then add a second and third , etc ?
"If FILE_WRITE does not combine with FILE_READ, a zero-length file will be opened. If even the file contains some data, they will be deleted. If there is a need to add data to an existing file, it must be opened using combination of FILE_READ | FILE_WRITE."
Sounds like UAC issues . . . don't install MT4 in Program Files.
- You open the file, WRITE only, so the file is now empty.
- You write one line and close the file. Of course "it seems like only a single line is written. "
int APPEND = FILE_CSV|FILE_WRITE|FILE_READ; int handleOPT = FileOpen(nameOPT, APPEND, '~'); if(handleOPT < 1){ int GLE = GetLastError(); ... } FileSeek(handleOPT, 0, SEEK_END); FileWrite(handleOPT, opt.parameters); FileClose(handleOPT);
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hil,
I am having problem with file written EA as it seems like only a single line is written.
Is following code ok ?
And also why is file written by MT4 not visible in Win7 explorer ? Folder persmission issues (whch i just cannot figure out why ? )
Thx
Jim