I'm working on this code to write on a .csv file, but the problem is that I want to leave the file open instead of open, write and close it.
Have you got a suggestion?
Thank you!
int handle_1=FileOpen("Monitor.csv", FILE_CSV|FILE_READ|FILE_WRITE, ';'); FileSeek(handle_1, 0, SEEK_END); //---- add data to the end of file FileWrite(handle_1,OrderTicket(),OrderSymbol(),OrderType(),OrderMagicNumber(),Entry_Bar,Bars,Size_1,Size_2,Size_3,Size_4,Take_1,Take_2,Take_3); FileClose(handle_1); handle_1=0;
Alberto Tortella: t the problem is that I want to leave the file open instead of open, write and close it. Have you got a suggestion?
You haven't stated a problem. So do it. Open and seek in OnInit, write in OnTick when something changes, close on OnDeinit.
You won't be able to read the file elsewhere unless you also add FILE_SHARE_READ.

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
Hi all, is there a way to clear an Excel sheet?
I'm developing my on Excel sheet to monitor my positions.
I'm searching between the File functions but I don't find it.
Thank you!