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
| Setting | Default | What it does |
|---|---|---|
| Corner | CORNER_LEFT_UPPER | Panel corner |
| X offset | 10 | Horizontal offset from the corner, in pixels |
| Y offset | 20 | Vertical offset from the corner, in pixels |
| Gauge width | 160 | Gauge bar width, in pixels |
| Gauge height | 14 | Gauge bar height, in pixels |
| Margin gauge max | 300.0 | Margin-level gauge full-scale value, in percent |
| Max expected lots | 5.0 | Lot total that reads as a "full" exposure gauge |
| Warn fraction | 0.33 | Fraction of full scale where the bar turns yellow |
| Danger fraction | 0.66 | Fraction of full scale where the bar turns red |
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 → Indicators.
- 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 indicator from the Navigator onto a chart and adjust the settings.
Tags: MT4 Indicator · MQL4 Source Code