What it does
FXP Account Risk Dashboard keeps the numbers that matter for risk control on your chart: balance, equity, floating profit or loss, profit or loss closed today, total daily P/L, the highest equity seen today, the drawdown from that high, the number of open positions, the money that would be lost if every stop-loss were hit, how many positions have no stop-loss, and margin level.
It is a read-only tool. It never opens, modifies or closes trades. The panel updates every second on a timer.
How it works
- Floating P/L = sum of profit plus swap of the open positions that match the filter.
- Closed today = profit + swap + commission + fee of all buy and sell deals since the start of the trading day (server midnight by default). Deposits and withdrawals are excluded.
- Daily P/L = closed today + floating. Its percentage is relative to the day-start balance, estimated as current balance minus everything closed today.
- Equity high today starts at the larger of the day-start balance and current equity and is raised whenever equity sets a new high while the dashboard is running. It is stored in a terminal global variable, so it survives timeframe changes and restarts on the same day.
- Drawdown from high = equity high - current equity, also as a percentage.
- Risk to SL (from entry) uses MetaTrader's own profit calculation for each position from its open price to its stop-loss, summing only the losing results. Risk to SL (from now) does the same from the current price, which shows how much more you could lose from here.
How to use it
Copy the .ex5 file into MQL5/Indicators and attach it to any chart; one copy is enough for the whole account.
Many traders set a daily loss limit and a maximum open risk, for example a small percentage of the account per trade. The dashboard shows how close you are to those limits, and the two alerts warn you when you cross them. Any position listed under "without SL" carries open-ended risk; our lesson on basic risk management and the glossary entry on drawdown explain why that matters.
Use the magic number filter to track a single Expert Advisor, or the symbol scope to focus on one market.
Settings
| Input | Default | What it changes |
|---|---|---|
| Positions and deals to include | All symbols | All symbols or chart symbol only. |
| Magic number filter | -1 (all) | Restrict to one EA's trades. |
| Trading day starts at (server hour) | 0 | Reset time for daily figures. |
| Panel X / Y offset | 12 / 24 | Panel position. |
| Font size | 9 | Text size; the panel scales with it. |
| Colors | dark theme | Background, labels, values, positive and negative colors. |
| Alert when drawdown from daily high exceeds % | 0 (off) | Daily drawdown warning. |
| Alert when open risk exceeds % of balance | 0 (off) | Open-risk warning. |
Limitations
- The equity high is tracked only while the dashboard runs. Peaks reached while MetaTrader was closed are not known; the day-start balance is used as a floor.
- Deposits or withdrawals during the day distort the day-start balance estimate.
- Risk to SL ignores slippage and gaps, which can make real losses larger than the figure shown, and it does not include pending orders.
- Figures are in account currency and depend on your broker's conversion rates. Trading involves substantial risk of loss.

