I'm using Ubuntu 14 and trying to create a script to write files, but I'm getting the 5004
error, every time I try to open a file.
datetime currtime;
bool newcandle;
string terminal_data_path = TerminalInfoString( TERMINAL_DATA_PATH );
string filename = terminal_data_path + "\\MQL4\\Files\\" + "data.csv";
int filehandle;
filehandle = FileOpen( filename, FILE_WRITE | FILE_CSV );
if ( filehandle < 0 ){
Print( "Failed to open the file by the absolute path " );
Print( "Error code ", GetLastError() );
}
else {
Print( "file opened with sucess" );
}
How can I solve this problem on Ubuntu?
UPDATE
I tried to change my file to the following:
string terminal_data_path = TerminalInfoString( TERMINAL_DATA_PATH );
string filename = terminal_data_path + "\\tester\\files\\data.csv";
and just for this
string filename = "\\tester\\files\\data.csv";
and for this
string filename = "\\files\\data.csv";
But I'm still getting error, but this time is 5002
not 5004
.