Loading…

Risk Budget Burn-Down

A daily loss limit is usually tracked as a single number - "$500 max loss today" - checked by glancing at the account's current P/L. That tells you whether the limit has been hit, but not whether today is on pace to hit it. Losing $400 in the first hour of a ten-hour session is a very different day from losing $400 spread evenly across it, even though the raw number is identical. This indicator plots two lines in a subwindow, both scoped to a configurable trading session window (broker/server time). The dotted grey line is the IDEAL pace: the full budget at session open, ramping straight down to zero at session close - "if losses were spent perfectly evenly, this is where the remaining budget would sit right now." The solid blue line is the ACTUAL budget remaining: the daily loss limit minus every dollar already lost today, both realised (closed orders) and, on the current bar, floating (open orders). Running below the ideal line means today is burning through risk faster than an even pace would - the visual a desk risk manager gets from a real burn-down chart. Only losses count against the budget; a winning day is not represented as "budget refilled above 100%", because a daily loss LIMIT is a ceiling on how much can be lost, not a spending target to hit regardless of how the day is actually going. Notes and limitations - Session times are broker/server time, not the trader's local time - check the difference before setting the hours, especially around daylight-saving changes. - Account-wide: it sums every closed/open order regardless of symbol or magic number. - Floating loss is only meaningful "right now" and is only added on the current, still- forming bar; historical in-session bars show realised loss up to that point only. - If the session window spans midnight (end hour less than start hour) it is not handled - configure a same-day window. A desk running an overnight session should split it into two attached instances or treat the loss budget as resetting at midnight. - This is a passive display only; it does not close trades or block new ones when the budget is exhausted.

Indicator · MT5 · v1.0 · Free

About Risk Budget Burn-Down

Risk Budget Burn-Down is an indicator for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 9 settings, such as Daily loss budget, Session start hour and Session start minute. MQL source code included.

Files in the download: RiskBudgetBurnDown.ex5, RiskBudgetBurnDown.mq5, RiskBudgetBurnDown.txt.

Settings

SettingDefaultWhat it does
Daily loss budget500.0Daily loss limit in account currency (must be > 0)
Session start hour0Session start, broker/server time, hour (0-23)
Session start minute0Session start, broker/server time, minute (0-59)
Session end hour23Session end, broker/server time, hour (0-23)
Session end minute59Session end, broker/server time, minute (0-59)
Include swap commissiontrueFold swap + commission into the loss-used calculation
Alert on budget breachtrueAlert once when the remaining budget first hits zero
Alert cooldown seconds900Minimum seconds between repeat breach alerts
Max backfill bars3000Cap on bars re-scanned on first load (each in-session bar re-scans deal history)

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 · Risk & Lot Size · Alerts · MT5 Indicator · MQL5 Source Code

MetaTrader 4 & 5 indicators · PolyMaria