Indicator Matrix Export
Building a feature table for external analysis normally means exporting each indicator separately, then joining the files by bar time - tedious, and an easy place to introduce an off-by-one join error between files that were exported with slightly different date ranges or timeframes. This script computes every indicator directly against its own bar shift for each row, calling the standard MQL4 indicator functions (iMA, iRSI, iATR, iBands, iStochastic, iMACD, iCCI, iADX) fresh for every bar rather than reading a rolling window computed once and reused. That avoids the subtle drift a "compute once, shift an array" shortcut can introduce once adjacent bars would otherwise need different lookback windows to stay exact. Rows inside each indicator's own warm-up window - not enough history behind that bar for a period-N indicator to have a first real value - are skipped rather than exported with a misleadingly early, incomplete number. Notes and limitations - The export starts far enough into history that the slowest-warming indicator among those selected has a full window at the very first exported row - there is no partially-warmed leading row. - All indicators use their standard default price/method (close price, simple moving average where applicable, typical price for CCI). This is a fixed feature set, not a configurable indicator library - it covers the common baseline, not every possible variant. - Values are computed indicator-call by indicator-call per bar. For a very long export range across many bars this is more CPU work than a single rolling pass would be; it is built for a one-off export, not for a tight loop run every tick. - This exports historical values only. It does not update live as new bars form; run it again to refresh.
Script · MT5 · v1.0 · Free
About Indicator Matrix Export
Indicator Matrix Export is a script for MetaTrader 5 based on MACD, RSI, Stochastic and Moving Average. It can alert you with a pop-up, sound, email or push message. It has 19 settings, such as Symbol, Timeframe and From date. MQL source code included.
Files in the download: IndicatorMatrixExport.ex5, IndicatorMatrixExport.mq5, IndicatorMatrixExport.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Symbol | Symbol, blank = current chart symbol | |
| Timeframe | PERIOD_CURRENT | Timeframe for every indicator and the OHLC columns |
| From date | 0 | From bar open time (1970.01.01 = as far back as history allows) |
| To date | 0 | To bar open time (1970.01.01 = up to the latest bar) |
| Ma fast period | 10 | Fast moving average period |
| Ma slow period | 50 | Slow moving average period |
| Rsi period | 14 | RSI period |
| Atr period | 14 | ATR period |
| Bands period | 20 | Bollinger Bands period |
| Bands deviation | 2.0 | Bollinger Bands standard deviation |
| Stoch k period | 5 | Stochastic %K period |
| Stoch d period | 3 | Stochastic %D period |
| Stoch slowing | 3 | Stochastic slowing |
| Macd fast period | 12 | MACD fast EMA period |
| Macd slow period | 26 | MACD slow EMA period |
| Macd signal period | 9 | MACD signal period |
| Cci period | 14 | CCI period |
| Adx period | 14 | ADX period |
| Output file name | IndicatorMatrixExport.csv | Output file, written to MQL5\Files |
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 → Scripts.
- 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 script onto a chart to run it once.
Tags: MACD · RSI · Stochastic · Moving Average · Bollinger Bands · ATR · ADX · CCI · MT5 Script · MQL5 Source Code