Skip to content
All library documents

PropGuard Account-Level Loss Limits and Position Risk Controls

Article MQL5 code base

Summary

This document describes a MetaTrader 5 account-level risk manager intended for proprietary trading evaluations. It monitors all positions, regardless of whether an expert advisor or manual trading opened them, and can close positions and remove pending orders when daily or maximum loss thresholds are breached. Maximum loss can be measured from initial balance, highest equity, or the highest balance recorded at a daily reset. The tool can also block new positions after a breach until the next reset.

Additional controls include per-position and total notional caps in account currency, a required stop-loss after a grace period, and a maximum cash risk per position. It can tighten an overly wide stop or close the position if price has already passed the capped distance. Trading-hour rules, Friday exits, a high-impact news filter, notifications, and logs are also described. Example settings show buffers below stated firm loss limits to allow for slippage. Limits include dependence on server reset time, inactive calendar filtering in the strategy tester, and tester-only sample trades; the document provides no independent performance validation.

Key ideas

  • Daily and overall loss limits can be based on different account equity or balance reference points.
  • The manager can close positions, delete pending orders, and block new trades after a breach.
  • Notional and stop-distance risk caps are expressed in account currency to cover different instruments.
  • A stop-loss requirement, trading windows, Friday close, and news filter add operational controls.
  • Reset timing depends on server time, and the tester lacks economic-calendar data.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.