My problem: on the very first run in MT4 tester the file is written to c:\MT4InstallDir\tester\files\myfile.txt and contains a lot of data, as expected. I then delete the file. After running the tester again and again, the file is never created a second time. Why? Do I miss important information about writing files?
My problem: on the very first run in MT4 tester the file is written to c:\MT4InstallDir\tester\files\myfile.txt and contains a lot of data, as expected. I then delete the file. After running the tester again and again, the file is never created a second time. Why? Do I miss important information about writing files?
The 2nd and subsequent times does the FileOpen() work ? why aren't you checking the handle ? if the handle is -1 the FileOpen() has failed, check the return code and report he error to the log . . .
The 2nd and subsequent times does the FileOpen() work ? why aren't you checking the handle ? if the handle is -1 the FileOpen() has failed, check the return code and report he error to the log . . .
thanks for your help. Got the error now, it was a logical problem on other location.
BTW: yes I know what funcion return values are, but that was a fast test only :-)

- 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 want to write some tick information to a file and I use a simple file appending function:
{
int handle = FileOpen(fileName,FILE_READ|FILE_WRITE);
FileSeek(handle,0,SEEK_END);
FileWrite(handle,txt2Append);
FileFlush(handle);
FileClose(handle);
}
My problem: on the very first run in MT4 tester the file is written to c:\MT4InstallDir\tester\files\myfile.txt and contains a lot of data, as expected. I then delete the file. After running the tester again and again, the file is never created a second time. Why? Do I miss important information about writing files?
Thank you,
Alex