Indicator Load Profiler
Building a multi-indicator dashboard usually means guessing which of your candidate indicators are cheap and which are heavy, then finding out the hard way once the chart starts lagging. This tool answers that question directly by actually loading each candidate through iCustom() and timing it, rather than relying on file size or a hunch. MQL4's iCustom() is not handle-based like MQL5 - every call is synchronous. The first call against a given indicator name pays the real attach cost: MetaTrader loading the compiled program, running its OnInit, and calculating its indicator values across the chart's whole visible history. Every later call with the same parameters on the same tick is effectively free, reusing the already-computed instance, until a new bar or tick genuinely requires recalculation. Those are two different numbers a dashboard builder cares about - "how much will this cost me the moment I attach it" versus "how much does it cost per tick once it is already running" - so this profiler measures and reports them separately rather than blending them into one misleading average. Measurement runs on a timer independent of real price ticks, so a profile completes in a few seconds even on a quiet symbol, rather than waiting on however many ticks the market happens to produce. Notes and limitations - GetTickCount() has limited resolution on Windows (commonly ~15ms), so individual millisecond figures - especially for genuinely cheap indicators - are approximate, not exact. Use the ranking (relative ordering) as the primary signal, not the absolute millisecond value. - A candidate is called with no extra parameters beyond (symbol, timeframe, name, 0, 0) - i.e. its own default input values. An indicator whose behaviour or cost depends heavily on non-default inputs is not profiled under those inputs; this tool cannot know a candidate's parameter list in advance. - Indicators that fail to load (wrong name, wrong subfolder, compile error in the candidate itself) are reported as FAILED with the MQL4 error code from GetLastError(), not silently skipped or crashed on. - "Steady-state" cost reflects repeated iCustom calls against an already-loaded instance with no new bar data - it approximates the marginal cost of a dashboard holding many indicators simultaneously, not a worst-case recalculation-heavy scenario (e.g. a fast-moving market opening many new bars per second). - The panel measures only indicators you list; it has no way to discover or profile a dashboard's indicators automatically.
Indicator · MT5 · v1.0 · Free
About Indicator Load Profiler
Indicator Load Profiler is an indicator for MetaTrader 5. It has 12 settings, such as Indicator names, Max indicators and Steady state samples. MQL source code included.
Files in the download: IndicatorLoadProfiler.ex5, IndicatorLoadProfiler.mq5, IndicatorLoadProfiler.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Indicator names | Examples\\ADX,Examples\\ATR,Examples\\En | Comma-separated custom indicator names (relative to MQL5\Indicators\) |
| Max indicators | 20 | Safety cap on how many names from the list are profiled |
| Steady state samples | 20 | Timer ticks of steady-state timing averaged per indicator before its ranking freezes |
| Timer seconds | 1 | Seconds between measurement steps (also the GetTickCount() resolution floor) |
| Corner | CORNER_LEFT_UPPER | Panel corner |
| X offset | 10 | Horizontal offset from the corner, pixels |
| Y offset | 20 | Vertical offset from the corner, pixels |
| Font size | 9 | Font size |
| Text color | clrWhite | Row text colour while still measuring |
| Done color | clrLimeGreen | Row text colour once steady-state timing has frozen |
| Fail color | clrOrangeRed | Row text colour when an indicator could not be loaded |
| Show background | true | Draw a solid backing rectangle behind the panel |
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: Dashboards & Scanners · MT5 Indicator · MQL5 Source Code