Skip to content
All library documents

Account Risk Controls for Drawdown, Daily Loss, and Trading Limits

Article MQL5 code base

Summary

The document describes an account-level risk management tool for MetaTrader 5. It outlines controls for equity drawdown, daily losses, trailing drawdown from peak equity, trading hours, spreads, position counts, total lot exposure, and daily order counts. Users can choose whether a limit closes all positions, losing positions, or the largest losing position, and can filter monitoring by magic number. Alerts can warn as a configured share of a limit is reached, while a dashboard and event log support monitoring and review.

The examples give default settings, including a 5% drawdown threshold, a 3% daily loss limit, and a warning at 80% of a limit. These are product configuration examples, not evidence that the controls improve performance or prevent losses. The description does not explain how daily limits reset, how execution failures or gaps are handled, or how risk settings should be calibrated to a particular strategy or account.

Key ideas

  • Drawdown can be measured from account balance or from peak equity.
  • Daily loss limits can disable trading after a configured loss is reached.
  • Session, spread, position-count, lot-exposure, and order-count filters can constrain trading activity.
  • The close method determines which positions are targeted when a limit triggers.
  • Alerts and event logs provide warnings and an audit trail, but the document offers no performance evidence.

Tags

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