MOEX Order Types and MQL5 Trading Operations for Robots
Summary
This beginner-oriented guide explains how MetaTrader 5 and MQL5 represent trading on Moscow Exchange. It contrasts market orders, which seek immediate execution but cannot assure price, with limit orders, which set a price but may remain unfilled. It also describes stop and stop-limit orders, including how some are held on the MetaTrader server and converted to exchange orders when triggered. Take-profit and stop-loss behavior varies by market segment and order type.
The article outlines common robot operations through trade requests, OrderSend, and OrderSendAsync, emphasizing that a successful send is not the same as a completed trade. Orders can later fill, partially fill, or be rejected, and transaction events expose the sequence of changes. Standard Library classes provide helpers for orders, positions, deals, and account information. The material is a platform guide rather than a strategy test; execution details depend on exchange conditions, connectivity, liquidity, and the broker's setup.
Key ideas
- Market orders prioritize execution while limit orders specify a price without guaranteeing a fill.
- Pending stop orders may be stored by the platform and sent to the exchange after triggering.
- A successful request submission does not establish that an order was filled or accepted.
- Asynchronous sending returns sooner, while later transaction events report order progress.
- MQL5 Standard Library classes help manage orders, positions, deals, and terminal information.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.