Download MetaTrader 5

testing/optimization parameters, results on the fly

To add comments, please log in or register
szgy74
269
szgy74  

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.

Carl Schreiber
7091
Carl Schreiber  
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.
Fernando Carreiro
2202
Fernando Carreiro  
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.

szgy74
269
szgy74  
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!

whroeder1
15574
whroeder1  
szgy74: Thank you guys. In fact this TesterStatistics() is what I was looking for!
List of MQL4 Functions - MQL4 Reference
To add comments, please log in or register