Bauer_Boy:
I'm trying to write data to a file but it keeps writing it over the old data, i'm using the file seek function but it doesn't seem to like me, is their something small i'm doing wrong?
handle=FileOpen("test_2", FILE_CSV|FILE_READ|FILE_WRITE,';');
gordon:
Quick fix like I said :), thanks a lot
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I'm trying to write data to a file but it keeps writing it over the old data, i'm using the file seek function but it doesn't seem to like me, is their something small i'm doing wrong?
int start()
{
if(Hour() == 17 && hit == true)
{
handle=FileOpen("test_2", FILE_CSV|FILE_WRITE,';');
FileSeek(handle,0,SEEK_END);
if(handle >0)
{
FileWrite(handle,"Close =",NormalizeDouble(Close[1],4));
FileClose(handle);
handle = 0;
Print("Closing Price Printed ",Close[1]);
hit = false;
}
else
{
Print("Filenot found, the last error is ", GetLastError());
}
}
if(Hour() > 17 && hit == false)
hit = true;