Building Tick-Count Candlesticks with a Custom MQL5 Symbol
Summary
This article explains how to build an activity-based chart in MetaTrader 5, where each candle aggregates a configured number of incoming ticks rather than a fixed time interval. An Expert Advisor creates or activates a custom symbol, copies key price properties from the source instrument, and can open a chart for the generated data.
For each tick, the EA updates the current bar’s open, high, low, and close, then publishes the forming candle with CustomRatesUpdate. Once the tick counter reaches its limit, it completes the bar, assigns an increasing timestamp, and starts a new one. The text describes the design and implementation workflow, but the supplied excerpt omits much of the code, so it offers limited detail for checking edge cases or reproducing the full EA. It presents no trading-performance evidence; the output is a charting and analysis aid, with possible extensions such as volume handling and persistent storage.
Key ideas
- A tick chart groups price updates into bars based on a configured tick count rather than elapsed time.
- A custom symbol provides a separate destination for generated bars and can inherit price settings from the source symbol.
- The EA updates OHLC values on every tick and publishes the forming bar to keep the display current.
- Completed bars receive increasing timestamps so the platform can display the tick-based series.
- The method describes chart construction and does not establish that tick bars improve trading results.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.