Portfolio Heat Thermometer
Knowing any single position's risk is easy; knowing the account's total risk right now, across five open tickets on three symbols opened by two different EAs, means either doing mental arithmetic mid-session or opening a spreadsheet. Portfolio Heat Thermometer sums (|open price - stop loss| / tick size * tick value * lots) for every open market order, regardless of symbol or magic number, adds them into one dollar figure, divides by current account equity, and draws the result as a vertical bar of coloured cells filled from the bottom - green under InpGreenBandPercent, amber up to InpAmberBandPercent, red above it. A position with no stop-loss cannot be measured this way - its real risk is whatever the account's margin allows before a stop-out, which is not a fixed number. Rather than quietly excluding such positions (which would understate total heat and show a falsely calm thermometer), the indicator pins the display to its hottest band whenever any unmeasurable position exists and shows a separate UNCAPPED counter alongside the percentage. An honest "cannot be measured, assume the worst" is safer than a confident wrong number here. Notes and limitations Pending orders are excluded from the sum - they carry no live risk until filled. Risk is computed per order at its own stop distance; it does not account for correlation between symbols (two correlated pairs each individually under the amber band can still represent one much larger real-world risk if both move together), and this indicator makes no attempt to detect that. It is entirely passive - it never modifies a stop or closes a position, only reports.
Indicator · MT5 · v1.0 · Free
About Portfolio Heat Thermometer
Portfolio Heat Thermometer is an indicator for MetaTrader 5. It has 15 settings, such as Green band percent, Amber band percent and Scale max percent. MQL source code included.
Files in the download: PortfolioHeatThermometer.ex5, PortfolioHeatThermometer.mq5, PortfolioHeatThermometer.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Green band percent | 2.0 | Heat % of equity at/under which the band is green |
| Amber band percent | 5.0 | Heat % of equity at/under which the band is amber (above = red) |
| Scale max percent | 10.0 | Heat % that fills the thermometer completely |
| Cell count | 16 | Number of stacked cells in the thermometer |
| Cell width | 22 | |
| Cell height | 12 | |
| Corner | CORNER_RIGHT_LOWER | |
| X offset | 30 | |
| Y offset | 30 | |
| Refresh seconds | 3 | |
| Green color | clrLimeGreen | Colour on the chart |
| Amber color | clrOrange | Colour on the chart |
| Red color | clrRed | Colour on the chart |
| Empty color | clrDimGray | Colour on the chart |
| Text 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: Trading Sessions · MT5 Indicator · MQL5 Source Code