csv question

 
Ok i setup my indicator to write some data to a csv file. Now I thought csv files were comma separated files but when i open up the files in word i see these special square blocks separating the fields. So I opened it up in notepad++ and that had the fields seperated by NUL character. When i try importing the csv into excel and use commas and/or semicolons for seperating fields it wont work. Excel isn't seeing any commas or semicolons in the csv file. So my question is what character does MT4 use separate fields in a csv file and what character does it use for a delimiter?
 
morpheus305:
Ok i setup my indicator to write some data to a csv file. Now I thought csv files were comma separated files but when i open up the files in word i see these special square blocks separating the fields. So I opened it up in notepad++ and that had the fields seperated by NUL character. When i try importing the csv into excel and use commas and/or semicolons for seperating fields it wont work. Excel isn't seeing any commas or semicolons in the csv file. So my question is what character does MT4 use separate fields in a csv file and what character does it use for a delimiter?

Delimeter character depends on your windows settings. You can change it from Control Panel -> Regional and Language Options -> Customize (button) -> List separator filed.

Anyway in excel seems to ignore the delimeter symbol but if you open it with a simple text editor (notepad) you will see it.

 
Well i opened up control panel and checked that setting and sure enough its set to a comma. When i open the csv up in notepad i dont see any delimiter symbols. In word i see square blocks(not commas) and in notepad++ i see NUL character. Something is wrong.
 

> csv files were comma separated files

They can be but the origin of term 'csv' is 'common separated value'

i.e. delimited by an agreed value common to source and destination - could be anything (almost)

> Something is wrong.

Sounds like you have a Unicode file, not a pure ASCII?

-BB-

 

morpheus305 wrote >>
Ok i setup my indicator to write some data to a csv file. 

Whatever text you can see in your lines of code should be exactly what you see in your output file since you are on the same computer, and they are both text files.

So what does those lines of code look like?