Visualizing Strategy Tester Optimization Results in MetaTrader 5
Summary
This document explains how to display Expert Advisor optimization results while a MetaTrader 5 Strategy Tester run is in progress. It describes using tester event handlers and frame functions to send per-pass information from test agents to the terminal. In the example, an Expert Advisor calculates an optimization criterion from profit and Sharpe ratio, then submits balance-curve data and statistics for display. The interface presents balance charts alongside pass statistics and input parameters.
The article outlines the flow: prepare chart objects at optimization start, collect and transmit each pass’s results, then read frames and update the display. It notes that optimization work runs on test agents after each pass and can use distributed cloud computing for calculation-heavy tasks. This is an implementation example, not evidence that the sample criterion or moving-average strategy is robust; optimization results still depend on the test setup and chosen objective.
Key ideas
- Tester event handlers and frame functions can pass optimization results to the terminal for display.
- The example visualizes balance curves, pass statistics, and the associated input settings.
- A custom optimization criterion combines profit and Sharpe ratio in the sample.
- Test agents can perform calculations during optimization, including distributed computations.
- The example demonstrates visualization mechanics rather than proving strategy quality.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.