Chart Load Meter
A chart that has become sluggish - slow to scroll, slow to redraw after a new tick - is usually carrying too many objects, too many attached indicators doing heavy work, or both. Finding which one is responsible is normally trial and error: detach indicators one at a time and see if it gets better. This panel gives three proxy readings instead of guesswork. First, every chart object is grouped by its name prefix (the text before the first delimiter, "_" by default - the same convention this catalogue's own indicators use for their own objects), so the heaviest object-creating tool is visible at a glance rather than buried in a single combined total. Second, it counts attached custom indicators across every window. Third, it tracks the average gap between consecutive OnCalculate calls as a rough measure of how promptly this chart is being serviced overall. MQL4 gives no API to read another program's own CPU time, and there is no way to measure actual GDI redraw duration from inside an indicator - that work happens inside the terminal binary itself, outside any script's visibility. All three readings here are proxies, not a real per-tool millisecond profiler; the panel says this plainly rather than implying more precision than MQL4 can actually deliver. Notes and limitations - Cannot measure another indicator's own CPU time, redraw cost, or GDI work - MQL4 exposes no such API. Object count by prefix and attached-indicator count are structural proxies; tick-to-tick latency is a timing proxy. None of the three is a direct profiler reading. - Prefix grouping is convention-based: two unrelated tools sharing a prefix are counted together, and any tool that does not prefix its own object names falls into a single "(no prefix)" catch-all bucket rather than being separately identified. - Tick-to-tick latency reflects when this chart's OWN OnCalculate is invoked, which depends on tick arrival as well as any actual redraw slowdown - a quiet symbol will show a large gap that has nothing to do with chart load. - This is a read-only diagnostic; it does not detach or disable anything itself.
Indicator · MT5 · v1.0 · Free
About Chart Load Meter
Chart Load Meter is an indicator for MetaTrader 5. It has 16 settings, such as Prefix delimiter, Top prefixes shown and Latency warn ms. MQL source code included.
Files in the download: ChartLoadMeter.ex5, ChartLoadMeter.mq5, ChartLoadMeter.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Prefix delimiter | _ | Character that splits "owner prefix" from the rest of an object name |
| Top prefixes shown | 5 | Largest N object-prefix groups shown |
| Latency warn ms | 250 | Average tick-to-tick gap (ms) that turns the latency readout amber |
| Latency critical ms | 750 | Average tick-to-tick gap (ms) that turns it red |
| Object warn total | 400 | Chart-wide object count that turns that readout amber |
| Object critical total | 900 | Chart-wide object count that turns it red |
| Latency smoothing ticks | 20 | How many recent ticks the latency average is smoothed over |
| Refresh seconds | 2 | Panel refresh interval |
| Corner | CORNER_LEFT_LOWER | |
| X offset | 8 | |
| Y offset | 10 | |
| Row height | 14 | |
| Ok color | clrLimeGreen | Colour on the chart |
| Warn color | clrOrange | Colour on the chart |
| Critical color | clrRed | Colour on the chart |
| Header color | clrWhiteSmoke | Colour on the chart |
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: Arbitrage · MT5 Indicator · MQL5 Source Code