Displaying Multi-Symbol, Multi-Timeframe Indicator Data in One Buffer
Summary
This article develops a MetaTrader 5 library method for displaying standard indicator data from another symbol and timeframe in a custom indicator subwindow. It focuses on single-drawn-buffer indicators and changes to the library’s buffer collection and engine classes. Buffer objects hold symbol, timeframe, indicator identity, and handle information, while a new collection method obtains the relevant time series and copies calculated values into the corresponding buffers.
A test indicator selects a standard indicator and applies it to data such as GBPUSD on M5 while running on EURUSD on M1. The author reports that the display includes indicator values and applicable levels, illustrating cross-symbol and cross-period use. The implementation copies all available data for each relevant buffer on each call, which the article acknowledges is inefficient; incremental copying is deferred. The work is preparatory for later support of main-chart and multi-buffer indicators, and the attached library is intended for MetaTrader 5 rather than tested for MetaTrader 4.
Key ideas
- Buffer objects associate indicator data with a symbol, timeframe, and indicator handle.
- A collection method can prepare calculated data for all created standard indicators.
- The example displays a selected indicator from one market series in another chart’s subwindow.
- The described approach copies all available data, which may be costly when repeated on every tick.
- The article covers single-buffer cases and leaves multi-buffer support for later work.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.