hi, im writing an EA to parse a years worth of data to give me highs/lows for each day etc and dump to a csv.
my code is fairly standard. open a file for appending, into a handle, write to it, then close.
only problem is, its not 'appending' to the csv. Its overwriting each time so i only get one line in the csv, instead of like 365 lines (one for each day).
Any ideas?
I thought
would be append mode??
Thanks
J
my code is fairly standard. open a file for appending, into a handle, write to it, then close.
only problem is, its not 'appending' to the csv. Its overwriting each time so i only get one line in the csv, instead of like 365 lines (one for each day).
PHP Code
fh = FileOpen("my_data.csv",FILE_READ|FILE_WRITE,';');
if(fh<1)
{
Print("File my_data.dat not found, the last error is ", GetLastError());
return(false);
}
FileWrite(fh, i,iHigh(NULL,PERIOD_H1,i));
I thought
PHP Code
FILE_READ|FILE_WRITE
Thanks
J