Loading…

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 · MT4 · v1.0 · Free

About Chart Load Meter

Chart Load Meter is an indicator for MetaTrader 4. It has 16 settings, such as Prefix delimiter, Top prefixes shown and Latency warn ms. MQL source code included.

Files in the download: ChartLoadMeter.ex4, ChartLoadMeter.mq4, ChartLoadMeter.txt.

Settings

SettingDefaultWhat it does
Prefix delimiter_Character that splits "owner prefix" from the rest of an object name
Top prefixes shown5Largest N object-prefix groups shown
Latency warn ms250Average tick-to-tick gap (ms) that turns the latency readout amber
Latency critical ms750Average tick-to-tick gap (ms) that turns it red
Object warn total400Chart-wide object count that turns that readout amber
Object critical total900Chart-wide object count that turns it red
Latency smoothing ticks20How many recent ticks the latency average is smoothed over
Refresh seconds2Panel refresh interval
CornerCORNER_LEFT_LOWERENUM_BASE_CORNER
X offset8
Y offset10
Row height14
Ok colorclrLimeGreenColour on the chart
Warn colorclrOrangeColour on the chart
Critical colorclrRedColour on the chart
Header colorclrWhiteSmokeColour on the chart

How to install

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

Download the PDF guide

Tags: Arbitrage · MT4 Indicator · MQL4 Source Code

MetaTrader 4 & 5 indicators · PolyMaria