Download MetaTrader 5

Access to Optimization Result of a tester with MQL4

To add comments, please log in or register
Arturo Schreiber
33
Arturo Schreiber  

Greetings. I'm trying to access the results of the chart "Optimization Result" when i run a test.

I don't really know how to use onTester(), as I can create messages, alerts, sounds, nor change variables. I dont really know when and how its called.

 

What I need to do is get the pass of Optimization results, idealy loop through them and modify them, maybe delete a few. How can I achieve this? 

Carl Schreiber
6784
Carl Schreiber  

Do you see the Optimization Results tab?

Either right mouse click => copy all or => save as report.

It has a formate that can be easily imported into an EXCEL-sheet.

There is even the option Set Input Parameters (to save this as a set-file) and you can run this now in visual mode.

All you need you find here!!

Arturo Schreiber
33
Arturo Schreiber  
gooly:

Do you see the Optimization Results tab?

Either right mouse click => copy all or => save as report.

It has a formate that can be easily imported into an EXCEL-sheet.

There is even the option Set Input Parameters (to save this as a set-file) and you can run this now in visual mode.

Thanks for your answer. But I'm trying to automate this process. Is there no way to access this result by mql4?
Carl Schreiber
6784
Carl Schreiber  
Aschab:
Thanks for your answer. But I'm trying to automate this process. Is there no way to access this result by mql4?
Yes, write the results into a csv-file OnTester(), read it, sort it, ....
Arturo Schreiber
33
Arturo Schreiber  
gooly:
Yes, write the results into a csv-file OnTester(), read it, sort it, ....
How do i Do that? I don't manage to do anything OnTester(). mql have a "write" and "read" csv functions or I need to create a dll?
Arturo Schreiber
33
Arturo Schreiber  
Aschab:
How do i Do that? I don't manage to do anything OnTester(). mql have a "write" and "read" csv functions or I need to create a dll?

I advanced. I did this:

 

handle=FileOpen("data1.csv",FILE_CSV|FILE_READ|FILE_WRITE,',');

   if(handle<1)

   {

   return(false);

   }

   else

   {

   FileWrite(handle, "Bidibidibadibum");

   } 

 

It works on my OnInit function. But not on my OnTester(). Where I'm messing up?

To add comments, please log in or register