Writing to a file with mql4 - page 2

 
Keith Watford:

I just realised that your code is a script.

How did you manage to open a script with the strategy tester?

You should also close the file after you have finished with it.

I wrote my code in the expert part of metaeditor 

 
OnStart() won't be executed in an expert advisor.
 
Okay, what function can I use
 
Hugo Tram:
Okay, what function can I use

OnTick or OnInit