Source code
OrderCheck versus OrderSend: what success actually means
OrderCheck examines a proposed request and provides a check result. OrderSend submits a request. Neither a single Boolean nor a printed “success” message should replace inspection of the result fields.
Keep the stages separate
Prepare the request, inspect the preflight result, submit only when appropriate, then interpret the returned trade code. This structure makes it easier to show whether failure came from preparation or execution.
Log enough context
Record symbol, action, volume, prices, check result and trade result. Remove account identifiers and credentials before sharing logs. Do not print a success banner before you have evidence of the state it claims.
Handle a changing market
A valid preflight is a snapshot. Price, margin and server state can change before execution. Your response should be based on the actual returned outcome rather than repeatedly sending the same request without inspection.
Design for understandable support
MQLume source access lets you add a concise event trail to your workflow. Clear messages reduce guesswork when a strategy appears quiet, and help you distinguish a signal decision from a rejected request.
Start with a free editable EA project · Explore MQLume source code
Back to top