Loading…

Workspace Composition Report

A terminal with a dozen charts open across several symbols and timeframes has no single view that answers "what exactly is my workspace right now" - Market Watch shows symbols with no timeframe or chart context, and the Window menu shows chart titles with no indicator detail. This script walks every open chart with ChartFirst()/ChartNext(), records its symbol, timeframe and every indicator attached in its main window and subwindows, then writes one plain-text report: a per-chart list, a by-symbol section showing which timeframes are open on each instrument, and a short summary count. The "where detectable" qualifier in the title is a real limitation, stated plainly rather than glossed over: MQL4 has no function that reports another chart's attached Expert Advisor by name from outside that chart - only a program's own WindowExpertName() call, describing itself, is available. This report therefore names the current chart's own expert (if this script happens to be run from a chart that also has one attached) and leaves every other chart's expert column blank. Attached indicators, by contrast, genuinely are readable cross-chart via ChartIndicatorsTotal() and ChartIndicatorName(), so the indicator list in this report is complete. The chart-walking and indicator-listing logic here is written from scratch for this project rather than shared with any other script in this catalogue, per house style - no submission includes another project's file. A similar pattern (chart inventory plus indicator listing as part of a larger CSV manifest) exists in a different, unrelated project in this catalogue with a different purpose and output shape; this script's own implementation is independent of it. Notes and limitations - Attached Expert Advisor names are only ever reported for the chart this script is run from - not for any other open chart. This is a genuine MQL4 API gap, not an oversight; see the full description above. - The report reflects the workspace at the moment the script runs. It is a snapshot, not a live or auto-refreshing view. - Charts on the same symbol and timeframe are still counted individually in the per-chart list, even though the by-symbol section only shows each timeframe once per symbol. - Indicators applied to an offline/custom symbol or a chart with an unusual timeframe still report correctly; the timeframe falls back to a numeric tag (e.g. "P2") for a period MQL4's named constants do not cover.

Script · MT5 · v1.0 · Free

About Workspace Composition Report

Workspace Composition Report is a script for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 1 setting, such as Output file. MQL source code included.

Files in the download: WorkspaceCompositionReport.ex5, WorkspaceCompositionReport.mq5, WorkspaceCompositionReport.txt.

Settings

SettingDefaultWhat it does
Output fileOutput filename in MQL5\Files (blank = auto)

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: Alerts · MT5 Script · MQL5 Source Code

MQL4 & MQL5 scripts · PolyMaria