Storing Expert Advisor Optimization Passes in an SQLite Database
Summary
This installment describes adding persistent storage to a multi-currency Expert Advisor development workflow. The project searches for promising parameter sets for individual strategies, groups compatible sets, combines groups, and eventually assembles them into an EA. Earlier stages relied on tester output and manual spreadsheet processing, which made results awkward to reuse.
The article compares retaining MetaTrader optimization cache files with storing pass data in a database, then begins an SQLite design using a table for inputs, auxiliary parameters, performance statistics, and timestamps. It outlines an MQL5 database helper for opening, creating, querying, and closing the database, and demonstrates saving optimization passes so their results can be compared with the tester. The example reports a best pass, but the article emphasizes data handling rather than validating a trading edge. Its initial schema is deliberately simple and does not yet cleanly associate passes with separate optimization runs, so further structure and automation are left for later work.
Key ideas
- The workflow separates strategy optimization, parameter grouping, group selection, and final EA assembly.
- A database can make optimization results easier to reuse than manual spreadsheet transfers.
- The proposed SQLite table stores pass inputs alongside tester performance statistics.
- MQL5 can support database operations, while other tools can be used for later processing.
- The initial implementation saves passes but does not yet organize them clearly by optimization run.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.