You don't need folder to write to the "Files" folder, it is default for the FileOpen() function.
Use this:
string filename="Text.txt";
And please, use "SRC" option when you enter source code in the post.
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
Hi ,
After Moving to MT4 ver 600 and more , My Last code for opening the file met the problem.
You Can see the code and the Error Message :
Also I'm running in wiondows8.1 X32 . Can anyone suggest a solution
void OnStart()
{
//---
int iErr=0;
string terminal_data_path=TerminalInfoString(TERMINAL_DATA_PATH);
string filename=terminal_data_path+"\\MQL4\\Files\\"+"Text.txt";
int filehandle=FileOpen(filename,FILE_READ);
if(filehandle<0)
{
iErr=GetLastError();
Alert("Error code In File Opening is Description : "+
ErrorDescription(iErr)+ " : No: "+ IntegerToString(iErr) );
}
else {
Alert("Successful File Opening");
FileClose(filehandle);
}
}