Can anyone give me a functional example?

 

I want an indicator can create txt file contain common information of bars, such as open, close and so on. I don't really know to handle files. Can anyone give me an example?

 
niva:
I want an indicator can create txt file contain common information of bars, such as open, close and so on. I don't really know to handle files. Can anyone give me an example?

Here you go.

Files:
writecci.mq4  2 kb
 

I never had chance to work with scripts, could you explain how it function.

 
niva:
I never had chance to work with scripts, could you explain how it function.

Put the script in the expert/scripts directory. Compile and drag it to the chart.

You can use it as an example hot to write into a file.

in your EA or indicator INIT procedure open the file(handle variable must be global) and inside the START procedure write into the file. Close the file in the REINIT procedure.

 

Totally understood.