Hi all,
I need some help with regards to file functions.
I have the below code (with no compile errors) for the script i have been trying to test out:
int h1;
h1 = FileOpen("data.csv", FILE_WRITE | FILE_READ, ";");
if(h1 < 0)
{
Print("Unable to open file my_data.csv");
return(false);
}
FileSeek(h1, 0, SEEK_END);
FileWrite(h1, High[1], Low[1], Close[1], Volume[1]);
FileClose(h1);
But when come to execution, these are the results:
2010.03.31 02:02:16CSV writing USDJPY,H1: loaded successfully
2010.03.31 02:02:16CSV writing USDJPY,H1: uninit reason 0
2010.03.31 02:02:16CSV writing USDJPY,H1: removed
I have a data.csv saved at C:\Program Files (x86)\MBT MetaTrader 4\experts\files
but i dont seem to be able to get any data whatsoever.
Btw, is it possible to save unclosed trades instead ?
Regards
Keiran
I need some help with regards to file functions.
I have the below code (with no compile errors) for the script i have been trying to test out:
int h1;
h1 = FileOpen("data.csv", FILE_WRITE | FILE_READ, ";");
if(h1 < 0)
{
Print("Unable to open file my_data.csv");
return(false);
}
FileSeek(h1, 0, SEEK_END);
FileWrite(h1, High[1], Low[1], Close[1], Volume[1]);
FileClose(h1);
But when come to execution, these are the results:
2010.03.31 02:02:16CSV writing USDJPY,H1: loaded successfully
2010.03.31 02:02:16CSV writing USDJPY,H1: uninit reason 0
2010.03.31 02:02:16CSV writing USDJPY,H1: removed
I have a data.csv saved at C:\Program Files (x86)\MBT MetaTrader 4\experts\files
but i dont seem to be able to get any data whatsoever.
Btw, is it possible to save unclosed trades instead ?
Regards
Keiran