Skip to content
All library documents

Prechecking MT5 Pending Stop Orders Against Broker Rules

Article MQL5 code base

Summary

This document describes a read-only MetaTrader 5 indicator for reviewing a proposed buy stop or sell stop on the chart’s current symbol. It compares the entered price and volume with broker contract details, including tick size, volume limits and increments, stop-distance requirements, order permissions, and quote freshness. It reports each rule separately and shows adjacent valid grid values when a price or volume is off-grid. The user remains responsible for entering and placing the order manually.

The evidence is a rule-by-rule static inspection, not a live server validation. A clean report cannot guarantee acceptance because quotes or server conditions may change, and the indicator does not estimate account risk, size positions, normalize inputs, or submit trades. Version 1.00 is limited to buy stop and sell stop orders on one chart symbol; other order types and broader monitoring features are outside its scope.

Key ideas

  • The indicator checks intended stop-order inputs against symbol trading constraints before manual submission.
  • Tick size and point are distinct, so a price can have valid decimal precision yet fall off the permitted price grid.
  • Quote age, order permissions, stop distances, and volume constraints can each affect the reported status.
  • A passing static check does not guarantee that the broker server will accept the order.

Tags

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