Tracking Expert Advisor Memory Use During Optimization
Summary
This document describes a library for monitoring an Expert Advisor’s memory consumption during strategy tester optimization. Its purpose is to help identify parameter configurations that use unusually large amounts of memory and may cause optimization passes to fail. The example EA repeatedly expands an array, while the monitoring library records peak memory use for each pass and returns that figure as the tester result.
The sample output reports the monitored peak alongside total test memory, tick data, and history data. The measurements can help locate resource-heavy configurations and guide further investigation in debug mode. The document does not provide a systematic method for diagnosing the cause of high use, nor does it show comparative optimization results or performance gains. Its focus is resource monitoring and the practical idea that reducing EA memory use can allow more testing agents to run. The example and measurements are specific to the MQL5 testing environment and should not be treated as evidence that the library will resolve memory limits in every setup.
Key ideas
- A monitoring library can record an Expert Advisor’s peak memory use during tester optimization.
- Returning peak memory as the tester result makes resource use visible across parameter passes.
- High memory consumption can help identify configurations that may cause optimization passes to fail.
- The measurements can guide follow-up debugging but do not identify the underlying cause on their own.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.