Skip to content
All library documents

Configurable Position Sizing for Prop-Firm Drawdown Rules

Article MQL5 articles

Summary

This article generalizes a position sizer originally tied to one prop-firm challenge by moving program-specific terms into a configurable rule set. The rules cover phase targets, daily and overall loss limits, whether the daily limit expands with intraday profit, drawdown measured on balance or equity, overnight holding, news-related profit credit, leverage, minimum trading days, and commissions. The account-state logic and sizing modifiers then consume that configuration rather than relying on module constants.

The motivation is that prop-firm loss budgets are path-dependent, especially when floating profit and loss count toward limits, while passing a challenge has an asymmetric payoff that can justify de-risking near a target. The article describes refactoring and validation against the earlier implementation over a simulated equity path, along with tests for alternative rules and sizing behavior. It frames the work as infrastructure for a larger series, not as proof of trading profitability. Configurations can become stale if a firm's terms change, and the article emphasizes keeping those inputs current.

Key ideas

  • Prop-firm position size must reflect both model confidence and the remaining daily and overall loss budgets.
  • A configurable rule-set separates a firm's terms from the general account-state and sizing logic.
  • Equity-based drawdown checks account for floating losses before positions are closed.
  • Phase targets and the asymmetric consequences of passing or failing can motivate reducing exposure as a target approaches.
  • The refactor is checked against the original implementation, but correct rule configuration depends on keeping firm terms up to date.

Tags

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