Download MetaTrader 5

testing/optimization parameters, results on the fly

To add comments, please log in or register
szgy74
270
szgy74 2016.08.07 17:50 

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
6674
Carl Schreiber 2016.08.07 19:03  
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
2285
Fernando Carreiro 2016.08.07 20:57  
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
270
szgy74 2016.08.08 07:23  
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
14750
whroeder1 2016.08.08 13:34  
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