Loading…

Account Gauge Cluster

This catalogue already has a plain text account panel listing balance, equity, floating P/L, margin level and open trade count. This tool takes three of the numbers that matter most for "am I in trouble right now" - margin level, total lot exposure and drawdown heat - and renders each as a segmented bar that fills and changes colour (green/yellow/red) as the value moves through its scale, so the state of the account can be read in the time it takes to glance at the chart rather than read three lines of text. Margin level's bar fills toward its danger zone as the value gets LOW (the gauge scale runs red at the empty end, green at the full end, because a low margin level is the account's most acute risk). Lot exposure and drawdown heat both run the other way - green when nearly empty, red as the bar fills - because more open exposure and more floating loss are both the risky direction for those two gauges. MQL4 has no chart object that draws a pixel-anchored circle or arc; OBJ_ELLIPSE is anchored to a price and a time, so it scrolls and rescales with the chart instead of staying put in a fixed corner. The "gauges" here are therefore horizontal segmented bars - a grey track plus a resizable coloured fill, both pixel-anchored to a chart corner via OBJ_RECTANGLE_LABEL - not literal circular dials. This is stated plainly so nobody expects a speedometer-style image; the bar-gauge approach gives the same at-a-glance colour-coded read while staying genuinely fixed on screen. Notes and limitations These are bar gauges, not circular dials - see the design note above for exactly why MQL4 cannot draw a fixed-position dial. Drawdown heat is computed as the current negative floating P/L as a percentage of account balance; it reads 0% whenever floating P/L is flat or positive, by design - it measures live risk exposure, not overall account performance. Lot exposure sums the volume of every currently open market order across ALL symbols on the account, not just the chart's own symbol, since account-level margin and exposure are account-wide concerns.

Indicator · MT4 · v1.0 · Free

About Account Gauge Cluster

Account Gauge Cluster is an indicator for MetaTrader 4. It has 9 settings, such as Corner, X offset and Y offset. MQL source code included.

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

Settings

SettingDefaultWhat it does
CornerCORNER_LEFT_UPPERPanel corner
X offset10Horizontal offset from the corner, in pixels
Y offset20Vertical offset from the corner, in pixels
Gauge width160Gauge bar width, in pixels
Gauge height14Gauge bar height, in pixels
Margin gauge max300.0Margin-level gauge full-scale value, in percent
Max expected lots5.0Lot total that reads as a "full" exposure gauge
Warn fraction0.33Fraction of full scale where the bar turns yellow
Danger fraction0.66Fraction of full scale where the bar turns red

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: MT4 Indicator · MQL4 Source Code

MetaTrader 4 & 5 indicators · PolyMaria