Object Inventory Report
A chart that has accumulated months of manual drawings and indicator objects becomes hard to reason about - how many trend lines are actually there, which prefix is responsible for most of the clutter, is there a stray object type nobody remembers drawing. This script answers that with one run: a table of counts per object type, and optionally a second table broken down by name prefix (the text before the first underscore in each object's name, a convention several tools in this catalogue follow). MQL4 has no "created at" timestamp on a generic chart object, so this does not invent one. What it reports instead, honestly labelled, is the object's own first time anchor (OBJPROP_TIME1) where that type actually has one - a trend line's left endpoint, a vertical line's position. Types with no time anchor at all (labels, buttons, rectangle labels) are reported with "n/a" rather than a fabricated age. Notes and limitations "Age" is reported only for object types with a genuine time anchor, and only as the object's first anchor point - not a true creation timestamp, which MQL4 does not expose. Prefix grouping is a naming convention, not a guarantee; objects with no underscore in their name group under their full name. Read-only - never modifies or deletes any object.
Script · MT4 · v1.0 · Free
About Object Inventory Report
Object Inventory Report is a script for MetaTrader 4. It draws buy and sell arrows on the chart and can alert you with a pop-up, sound, email or push message. It has 3 settings, such as Prefix filter, Group by prefix and Write to file. MQL source code included.
Files in the download: ObjectInventoryReport.mq4, ObjectInventoryReport.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Prefix filter | Only count objects starting with this prefix (blank = all) | |
| Group by prefix | true | Also break totals down by prefix (text before first '_') |
| Write to file | false | Also write the report to Files\ObjectInventoryReport.csv |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Scripts.
- Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
- Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the script onto a chart to run it once.
Tags: Trend · Buy/Sell Arrows · Alerts · MT4 Script · MQL4 Source Code