Skip to content
All library documents

Building Optimization Reports with Deal History, Costs, and Return Statistics

Article MQL5 articles

Summary

This article describes MQL5 components for generating detailed trading reports to support an automated walk-forward optimizer. Since an Expert Advisor cannot directly access the strategy tester's full optimization data, the approach downloads and processes trade history, grouping deals by position so that results are easier to interpret when several algorithms or position increases create interleaved transactions.

A custom cost manager stores commission and slippage settings by symbol, then converts them into monetary amounts according to the instrument's calculation mode. It treats costs as applying to each deal, with percentage-of-turnover commission calculations for certain exchange-traded assets. The report tools also calculate return distributions, normalized series, value at risk, and a Z-score. These are reporting and infrastructure methods, not a trading signal or evidence that a strategy is profitable. The article refers to earlier installments for parts of the report-generation process, and the supplied text is incomplete, so it does not fully specify every calculation or validation step.

Key ideas

  • The report generator groups individual deals by position to make multi-strategy history easier to interpret.
  • A symbol-specific cost manager can add commission and slippage to historical trade results.
  • Cost calculations vary by instrument type, including turnover-based commission for some exchange assets.
  • The reporting process includes return distributions, normalized returns, value at risk, and a Z-score.
  • These tools improve optimization reporting but do not establish that an underlying strategy will perform well.

Tags

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