Skip to content
All library documents

Automating Historical Trade Review with Multi-Timeframe Charts

Article MQL5 articles

Summary

This article describes the first part of an MQL5 script intended to reduce routine work when reviewing past trades. It explains why traders should examine historical decisions as market conditions change, and outlines inputs for selecting either a single deal or a date range. Users can choose a main chart timeframe and up to three auxiliary timeframes, with separate right-side bar shifts to frame the price action around each deal.

The script gathers deal history for the selected period and records details such as opening and closing times and prices, exit reason, commission, swap, profit, and fees. The article focuses on input design and period-based history selection; selecting one deal and drawing the charts are reserved for the follow-up part. It supports retrospective analysis by organizing trade context and costs, but does not test a trading strategy or show that reviewing trades alone improves returns. The risk discussion motivates review, while the article’s practical contribution is an analysis aid.

Key ideas

  • Historical trade review can help assess whether a strategy remains suited to changing market conditions.
  • The script offers selection by an individual deal ticket or a specified date interval.
  • Users can configure multiple chart timeframes and adjust the space shown after each deal.
  • Period-based history selection collects trade timing, prices, exit reason, and transaction costs.
  • This installment covers data selection and inputs; chart drawing and single-deal selection are deferred.

Tags

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