Skip to content
All library documents

Auditing Broker Trading Rules for MQL5 Expert Advisors

Article MQL5 articles

Summary

This article presents a diagnostic tool for identifying broker-specific symbol conditions that can cause an Expert Advisor's orders or position management to fail. It audits accepted filling policies, execution mode, trade permissions, stop and freeze distances, volume limits and increments, and swap settings. The tool labels conditions as acceptable, warnings, or blockers, reports them on a chart and in logs, and can scan Market Watch symbols and export a CSV report.

The examples explain why portability requires matching code to broker specifications: a hardcoded filling type can be rejected, stops may need more distance than an EA assumes, and lot sizes must conform to the allowed step. A reported zero stop level may still correspond to a floating minimum tied to live spread, so it should not be treated as proof that any distance is allowed. This is a pre-deployment compatibility checklist, not a trading strategy or execution-quality study. Its warnings depend on the EA's implementation, and the audit alone cannot guarantee that orders will succeed under changing market conditions.

Key ideas

  • Broker symbols differ in filling policies, execution modes, permitted directions, stop distances, freeze zones, and volume increments.
  • An audit tool can report these conditions for one symbol or scan symbols in Market Watch and export results.
  • Nonzero stop and freeze levels require EA-specific checks, while a reported zero stop level may still imply a floating minimum.
  • Lot sizes should be rounded to the broker's volume step and checked against minimum and maximum limits.
  • The report helps identify compatibility risks but cannot guarantee order acceptance in live conditions.

Tags

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