Loading…

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

SettingDefaultWhat it does
SymbolSymbol, blank = current chart symbol
TimeframePERIOD_CURRENTTimeframe for every indicator and the OHLC columns
From date0From bar open time (1970.01.01 = as far back as history allows)
To date0To bar open time (1970.01.01 = up to the latest bar)
Ma fast period10Fast moving average period
Ma slow period50Slow moving average period
Rsi period14RSI period
Atr period14ATR period
Bands period20Bollinger Bands period
Bands deviation2.0Bollinger Bands standard deviation
Stoch k period5Stochastic %K period
Stoch d period3Stochastic %D period
Stoch slowing3Stochastic slowing
Macd fast period12MACD fast EMA period
Macd slow period26MACD slow EMA period
Macd signal period9MACD signal period
Cci period14CCI period
Adx period14ADX period
Output file nameIndicatorMatrixExport.csvOutput file, written to MQL5\Files

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Scripts.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the script onto a chart to run it once.

Download the PDF guide

Tags: MACD · RSI · Stochastic · Moving Average · Bollinger Bands · ATR · ADX · CCI · MT5 Script · MQL5 Source Code

MQL4 & MQL5 scripts · PolyMaria