Hi.
Looking for a bit of help with some code.
Like the title says, I can't get FileWrite to work within strategy tester. The code works just fine in an EA attached to a chart and outputs as expected but run the same EA in a strategy test and.....nothing....no file even created in the MQL4\Files folder.
It is very basic code, simply open file, output and close file.
Can anyone tell me what is wrong? Is the file created somewhere else?
Looking for a bit of help with some code.
Like the title says, I can't get FileWrite to work within strategy tester. The code works just fine in an EA attached to a chart and outputs as expected but run the same EA in a strategy test and.....nothing....no file even created in the MQL4\Files folder.
It is very basic code, simply open file, output and close file.
Inserted Code
int init() { int fh = FileOpen("file.txt", FILE_CSV|FILE_WRITE); Print(fh); //(prints "1" to journal indicating successful file open, but no file created in "MQL4\Files" FileWrite(fh,"value1", "value2"); FileFlush(fh); FileClose(fh); return(fh); }
Can anyone tell me what is wrong? Is the file created somewhere else?