Loading…

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

SettingDefaultWhat it does
Green band percent2.0Heat % of equity at/under which the band is green
Amber band percent5.0Heat % of equity at/under which the band is amber (above = red)
Scale max percent10.0Heat % that fills the thermometer completely
Cell count16Number of stacked cells in the thermometer
Cell width22
Cell height12
CornerCORNER_RIGHT_LOWER
X offset30
Y offset30
Refresh seconds3
Green colorclrLimeGreenColour on the chart
Amber colorclrOrangeColour on the chart
Red colorclrRedColour on the chart
Empty colorclrDimGrayColour on the chart
Text colorclrWhiteSmokeColour on the chart

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 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: Trading Sessions · MT5 Indicator · MQL5 Source Code

MetaTrader 4 & 5 indicators · PolyMaria