Skip to content
All library documents

Diagnosing and Restarting Failed Stages in Automated EA Optimization

Article MQL5 articles

Summary

This article investigates why an automated optimization pipeline failed to produce a final Expert Advisor database for one project. It traces the project through its stages by inspecting SQLite records for stages, jobs, tasks, and completed passes. Short task durations and missing pass records suggest that optimization did not actually run in later stages, even though the pipeline marked them complete.

The author demonstrates recovery by requeuing a failed stage, allowing its optimization tasks to run again, then restarting the final stage to generate the missing database. The rerun completes and produces a database, but the original cause remains uncertain: possible explanations include unavailable quote history, terminal bugs, or an optimization process that could not be stopped cleanly. The article also describes testing the resulting EA under configured drawdown and risk-management settings. Its practical lesson is to verify task and pass records rather than trusting stage status alone; the workflow depends on platform-specific database and tester behavior.

Key ideas

  • Inspect stage, job, task, and pass records to confirm whether each optimization stage actually executed.
  • Very short task durations and absent pass records can reveal a stage marked complete without a real tester run.
  • Requeuing a failed stage can rerun its optimization tasks and allow downstream stages to complete.
  • The demonstrated recovery generated the missing final EA database, but the initial failure cause was not established.
  • Platform instability and missing market history are possible sources of optimization failures.

Tags

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