Buffer Export Button
Reading raw indicator values off the chart one bar at a time is slow and error prone. This tool attaches a single "Export buffers to CSV" button; clicking it reads a named custom indicator's buffer(s) via iCustom across exactly the bars currently visible on the chart (so scrolling and zooming the chart first controls what gets exported) and writes them, one row per bar, to a timestamped CSV file. iCustom's calling convention needs to know an indicator's parameter list in advance, and this tool has no way to discover an arbitrary indicator's inputs at runtime - MQL4 has no reflection over another program's input set. It therefore calls the target indicator with NO extra parameters, meaning whatever defaults are compiled into that indicator's own inputs are what gets exported. This is stated plainly rather than pretending the tool can pass through custom settings it has no way to know about. Notes and limitations - Only exports buffers of an already-compiled custom indicator reachable by name under MQL4\Indicators; it cannot export the chart's own built-in indicators (Moving Average, RSI, etc. drawn via the terminal's native tools rather than a custom .ex4). - Calls the target indicator with its own default input values only - see above for why. To export with different settings, change the target indicator's own compiled defaults and recompile it first. - Maximum 8 buffers per export; a target with more buffers needs two passes with different InpBufferCount/manual column selection. - The CSV lands in the terminal's sandboxed MQL4\Files folder, not a user-chosen path - MQL4 file functions cannot write outside that sandbox.
Indicator · MT5 · v1.0 · Free
About Buffer Export Button
Buffer Export Button is an indicator for MetaTrader 5. It has 5 settings, such as Indicator name, Buffer count and File prefix. MQL source code included.
Files in the download: BufferExportButton.ex5, BufferExportButton.mq5, BufferExportButton.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Indicator name | Examples\\Awesome | Target indicator (path under MQL5\Indicators, no extension) |
| Buffer count | 1 | Number of buffers to export (1-8) |
| File prefix | BufferExport | Output filename prefix (goes in MQL5\Files) |
| X offset | 10 | Button horizontal offset |
| Y offset | 20 | Button vertical offset |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the indicator from the Navigator onto a chart and adjust the settings.
Tags: MT5 Indicator · MQL5 Source Code