Displaying API-Sourced Candle Data in an MQL5 Indicator
Summary
The article shows how to display externally sourced candle data in an MQL5 indicator by reading values previously saved to a file. Its workflow separates data retrieval from visualization: an Expert Advisor can make WebRequest calls and write candle data to a file, while the indicator reads that file because indicators cannot use WebRequest directly. The indicator is configured with buffers for open, high, low, close, and candle color, then maps these buffers to a color-candle plot.
The article describes reading and grouping saved time and price fields, filling the indicator buffers, and assigning bullish or bearish colors based on the relationship between close and open. It says the display can update when the active requesting EA adds market data to the file. The material is an implementation walkthrough; it does not provide a trading signal evaluation or performance evidence, and live updates depend on the EA and file workflow functioning correctly.
Key ideas
- An MQL5 indicator can access externally retrieved candle data through a file written by an Expert Advisor.
- A color-candle plot uses separate buffers for open, high, low, close, and candle color index.
- The indicator reads saved values, converts them to the required types, and places them in chart buffers.
- Candle direction determines which configured color is assigned to each plotted candle.
- Live updates rely on the requesting EA continuing to refresh the shared data file.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.