Advertisement IC Markets

Reading MT5 return codes instead of guessing

Compare ECN/Raw spread brokers, analyze execution speeds, report slippage, and evaluate commission structures for high-frequency traders.
Post Reply
Amanhasnoname
Posts: 1506
Joined: Fri Oct 30, 2026 9:45 am

Reading MT5 return codes instead of guessing

Post by Amanhasnoname »

MT5 returns a numeric code with every trade request, and most traders never look at it. The codes carry precise information. DONE means a full fill. DONE_PARTIAL means only part was filled. REJECT means the server refused. PRICE_OFF means no quotes, the equivalent of off quotes. REQUOTE and PRICE_CHANGED mirror their MT4 cousins. TOO_MANY_REQUESTS signals throttling.

For scalpers, the distribution matters. A healthy account shows nearly all DONE. A rising share of PRICE_CHANGED during certain hours reveals latency or volatility problems. TOO_MANY_REQUESTS tells that the code is firing faster than the server allows.

Logging each code with the timestamp, symbol, and order type builds a profile of execution quality. Sorting by hour shows where problems cluster.

Another useful field is the actual price versus requested, available in the result structure. Together with the code, it quantifies slippage per order type.

Reading codes also speeds up support conversations. Quoting an exact retcode and time gets faster answers than describing a feeling that fills were bad.

Which return codes show up most often in the logs?
Recommended broker for automated trading & scalping IC Markets
Post Reply