Skip to content
All library documents

Converting Tick Data into CSV and MetaTrader Candlestick History

Article MQL5 code base

Summary

This utility description explains how tick files collected in a proprietary format can be converted for analysis and charting. It outlines three output methods: exporting timestamped bid and ask observations to CSV, aggregating ticks into candlesticks for a chosen chart period and saving them for import, or writing the resulting bars directly into MetaTrader 4 history files.

The direct history-writing option can help fill gaps in quote history, while CSV output supports inspection or other processing workflows. The document describes capabilities rather than a trading strategy and presents no market study or performance evidence. It warns that direct edits affect the terminal’s current quote history and should be handled carefully; the usefulness of any reconstructed bars depends on the completeness and accuracy of the underlying tick data.

Key ideas

  • Tick files can be exported as timestamped bid and ask data in CSV form.
  • Tick observations can be aggregated into candlesticks for a selected period.
  • Candles can be written directly into MetaTrader 4 history to address missing quote intervals.
  • Direct history modification changes the data used by the terminal and requires care.

Tags

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