Hi. I believe that MT4 does not place data into columns or cells....at least not in a way that you can manually open the .csv and see the data listed by column or cell.
This thread might help you
https://forum.mql4.com/28909
Your code should work properly except for one minor problem - instead of:
FileWrite(handle,"Ticket #,Open Time,Type,Lots,Symbol,Open Price,Stop/Loss,Take Profit,Close Time,Close Price,Profit,Comment");
Should be:
FileWrite(handle,"Ticket #","Open Time","Type","Lots","Symbol","Open Price","Stop/Loss","Take Profit","Close Time","Close Price","Profit","Comment");
This way the header will be in columns as well.

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, Can anyone help me add the following script code, so that data into a CSV was imported into columns and cells?