testing/optimization parameters, results on the fly

 

Hi Guys,


Is there a way for the mql4 program (EA) to know these data during testing or optimization?

A simple example: I would like to print out on the chart the time interval the tester is running on or the actual profit factor, etc., on the fly anything from the final report.

Thank you.

 
Either print them in an appending way to a csv-file (use OnTesrt() for this) or watch the results in the results tab (2nd) of the tester.
 
szgy74: Is there a way for the mql4 program (EA) to know these data during testing or optimization?

A simple example: I would like to print out on the chart the time interval the tester is running on or the actual profit factor, etc., on the fly anything from the final report.

During the handling of the Tester event by the OnTester() event handler, use the TesterStatistics() to obtain the Statistics you need and then save them to a CSV file (using the various file functions) which then your live EA can read, process and select based on the criteria you define and adjust accordingly.

 
gooly:
Either print them in an appending way to a csv-file (use OnTesrt() for this) or watch the results in the results tab (2nd) of the tester.
FMIC:

During the handling of the Tester event by the OnTester() event handler, use the TesterStatistics() to obtain the Statistics you need and then save them to a CSV file (using the various file functions) which then your live EA can read, process and select based on the criteria you define and adjust accordingly.

Thank you guys. In fact this TesterStatistics() is what I was looking for!

 
szgy74: Thank you guys. In fact this TesterStatistics() is what I was looking for!
List of MQL4 Functions - MQL4 Reference
Reason: