Error Using FileAppend
Posted: Sep 13 2012
I am using FileDelete and FileAppend to output indicator values to a file.
Every so often I get an Error: Can't open/create file.
I am NOT accessing the file when the error occurs.
Is there a way to make the error stop or to ignore it would work too. I have to go back and unhide the study every time this happens.
I am using MC8 64.
Thanks, Tony
Code: Select all
if LastBarOnChart then
begin
filepath = "c:\mcdata\" + FileName + ".txt";
FileDelete(filepath);
FileAppend( filepath , NumToStr(var1[0],0) + "," + NumToStr(var1[1],0) + "," + NumToStr(var1[2],0) + "," +
NumToStr(currentbar,0) + "," + NumToStr(Date,0) + "," + NumToStr(time_s,0) + "," + NumToStr(Close[0],5) );
end;
I am NOT accessing the file when the error occurs.
Is there a way to make the error stop or to ignore it would work too. I have to go back and unhide the study every time this happens.
I am using MC8 64.
Thanks, Tony