Skip to content
All library documents

Automating Single-Trade History Selection and Chart Visualization

Article MQL5 articles

Summary

This article completes a MetaTrader 5 script for creating chart records of historical trades. It explains how to select the deals associated with one position using its position identifier, collect entry and exit details from account history, and assemble those details into stored records. The script then draws deal information and chart objects, adds a background, refreshes the chart, and saves the resulting visual record for later review.

The resulting workflow is intended to reduce manual effort when preparing trade charts for retrospective analysis. The article describes the output as a consolidated view that can help a trader examine entries, exits, and related trade properties. It does not present a measured evaluation of the tool or show that using it improves strategy returns; any claimed benefit depends on how the trader uses the saved charts. The method is specific to MetaTrader 5 history data and its position identifiers.

Key ideas

  • The script selects all historical deals belonging to one position by its identifier.
  • Entry and exit records provide prices, times, volume, costs, and other trade properties for chart annotation.
  • The tool consolidates trade details into a chart image for retrospective review.
  • Automated chart preparation can reduce manual work, but the article does not quantify its effect on trading results.

Tags

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