Skip to content
All library documents

Collecting Optimization Pass Data to Compare Custom Criteria Visually

Article MQL5 articles

Summary

The article describes a MetaTrader 5 workflow for collecting balance and equity data from Expert Advisor optimization passes, calculating several custom criteria, and displaying selected results as graphs and screenshots. It divides the implementation between code included in the EA, a custom criterion module, and a separate script that reads optimization frames and plots them.

To limit data volume, the method records account values around trade events and uses equity extremes when positions close. It packages pass data and tester statistics for later sorting and visualization, with settings to choose which passes and equity values to retain. The article explains handling open positions at the test end and notes that the saved frame file may only be accessible after restarting the terminal.

This is a tooling method for comparing optimization outcomes, not evidence that any criterion produces profitable strategies. Results depend on the chosen equity convention, criterion settings, and pass filters; the article also acknowledges that recording and screenshot generation can add processing time.

Key ideas

  • The workflow captures balance and equity values around trade events to reconstruct pass graphs.
  • Optimization frames can include tester statistics and be read later by a separate plotting script.
  • Settings determine which passes are saved and how equity extremes affect custom criteria.
  • Open positions at the end of a test require a virtual closing point for the plotted series.
  • The method supports visual comparison of criteria but does not establish that optimized results will remain profitable.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.