Quote:
|
Originally Posted by cardio
Hi
I was trying out file functions during the week and they worked fine - then I sat down Saturday to try some file functions - and nothing works. I figure it is because the 'int start()' function is only called on a new trade - so with no trading - there is nothing to kick of the program. Or am I totally confused?
|
Hi cardio,
int start() does not work only when receiving new quotations (which is disabled at Saturdays) but it works too when you attach your EA or CI to the chart, when you change the charts periodicity, when you refresh the chart and a lot of other cases.
To be sure of what am I saying, try this code where OpenFile and int start have worked with me in Saturday:
int start()
{
Alert("I'm working even in Saturdays!"); //are you working in Saturdays?
int handle;
handle=FileOpen("test.txt",FILE_BIN|FILE_WRITE);
if(handle<1) //there's an error opening the file
{
Alert(ErrorDescription( GetLastError()));
}
else
{
Alert("file has been opened");
FileWrite(handle,"hi");
FileClose(handle);
}
}
So I think there's something wrong with those functions.
Do you have any code to test?