In this article
After this article, you can
- Identify the error category without mixing MT4 and MT5 codes.
- Check price increments, minimum volume and the risk of a corrected order.
Terms at hand: Stop loss · Lot (position unit) · Margin (deposit margin)
When MT4 or MT5 rejects an order, read the exact message and verify the account state first. The issue may concern price, volume, stop distance, permissions or trading hours. Increasing the position, removing protection and repeatedly clicking are not a diagnosis. Separate a technical correction from changed risk before contacting support. It concerns MetaQuotes platforms; your provider determines the account and instrument settings.
Does an error mean that nothing happened on the account?
Separate a confirmed rejection, a fill and an uncertain response. Following a connection error or timeout, check positions, active orders and history before retrying. The instruction may already have reached the server. Identify the specific ticket, symbol, volume and time; the absence of a new row in one window is insufficient evidence.
In an MT5 program, OrderSend=true does not prove a fill. The OrderSend documentation requires evaluation of the result structure and subsequent events. Check the quantity actually executed, not just requested. When reducing risk, use the correct position-closing operation. An opposite sell can create another position on a hedging account. The procedure after a lost response is developed in the guide to mobile account operation.
Which code should you check: MT4 or MT5?
Numbers from the two platforms are not interchangeable. MQL4 retrieves an error through GetLastError(); a MQL5 request result contains retcode. The pairs below identify similar problem categories, not identical handling of every operation. They come from the official MQL4 and MQL5 lists.
| Problem | MT4 | MT5 | First check |
|---|---|---|---|
| Invalid stops | 130 | 10016 | Price side, distance and grid. |
| Invalid volume | 131 | 10014 | Minimum, step and maximum. |
| Trading disabled | 133 | 10017 | Permissions and symbol mode. |
| Market closed | 132 | 10018 | The instrument's trading session. |
| Insufficient funds | 134 | 10019 | Required margin and account state. |
| No quotes | 136 | 10021 | Quote freshness and server reply. |
Save the message text and the intended operation: a new entry, modification or closure. A new price proposal is covered in the article on requotes.
Why can a price look correct while the stop is invalid?
Separate the platform point, minimum price increment and required distance in the specification. Decimal places describe formatting, not the entire valid price grid. MT5 documentation distinguishes Point, Tick size, Stops Level and Freeze Level. Stops Level concerns minimum distance; Freeze Level restricts operations within a freezing area. One cannot replace the other.
Own hypothetical example, a fictional linear instrument: the point is 0.00001, tick size 0.00005 and Stops Level 20 points. Bid is 1.10000 and Ask 1.10010. For a new long-position stop loss we check distance from Bid. A level of 1.09983 is 17 points away and off-grid: 1.09983 / 0.00005 = 21,996.6. A price of 1.09980 is on-grid and gives the required 20 points in this snapshot. This checks two conditions; it does not guarantee acceptance or execution.
If entry were at the stated Ask, the distance to the corrected stop would be 0.00030. For 10,000 base-currency units, planned price loss is 3 USD rather than 2.70 USD at the original level. We assume USD valuation and exact fills solely for arithmetic, excluding costs and slippage. Recalculate volume or decline the entry. Moving the stop without recalculating increases the loss budget.
MT4 documentation cautions that zero MODE_STOPLEVEL may mean no restriction or a level dynamically controlled by the server. Zero is not a promise that every stop will be accepted. Read fresh quotes before another attempt; the market need not remain at the previous snapshot. the stop loss and take profit article develops the price-side rules.
For a rejected modification, also read the freezing area: MODE_FREEZELEVEL in MT4 or SYMBOL_TRADE_FREEZE_LEVEL in MT5. Record its value and unit. Changing the decimal formatting in the form does not reduce that operational restriction.
Does a correct volume step solve the problem?
Check minimum, maximum and increment separately for the lot, the position-volume unit. In our own model, minimum volume is 0.10 lot and the step is 0.01. A calculated 0.04 is a step multiple but remains below the minimum. Raising it to 0.10 increases exposure 2.5 times. That change does not repair the original plan.
Available margin answers a different question from stop-loss risk. Do not respond to insufficient funds by selecting higher leverage. Record the permissible quantity, cost and account reserve, and reject a configuration that breaches your limit. For a partial closure, also check the quantity remaining after the operation. the position-sizing article shows the complete calculation.
Does a valid step mean a valid volume?
What should you check when trading is disabled or prices are missing?
Start with the correct account, server and full symbol, including any suffix. Read the session for that instrument; another pair's hours or another venue's schedule do not settle the issue. Check the last quote time, connection state and permitted operations. A close-only mode is not a reason to use a new opposite entry as a workaround.
For an automated program, separate terminal consent, program settings and server permissions. Working quotes do not prove permission to trade. Do not enable every permission blindly. If the cause is unclear, prepare a support request containing platform/version, masked account identifier, symbol, time with time zone, request type, parameters and exact response. Passwords and login codes do not belong in that request.
A technically valid order can still breach the risk plan. Recalculate planned loss after every change to price or volume.
What to do after closing this article?
- Create one incident record. Separate the original request, response and confirmed account state. Record known facts and missing fields. Do not infer rejection or execution from an expectation alone; use the provider's official channel when the state remains unclear.
- Copy the specification on demo. Record point, tick size, stop distance, minimum volume and volume step. Calculate one hypothetical level without submitting a trade. Then inspect the form; do not deliberately generate errors on a funded account.
- Compare the plan before and after correction. Include the new distance, quantity, costs and margin. If the correction breaches your limit, stop that configuration. The exercise aims for a correct diagnosis, not a green confirmation at any price.
Check your understanding
One short exercise
About 2 min · you can try again
The model requires a 0.10-lot minimum and a 0.01 step. Your risk plan permits 0.04 lot. What should you do?
- Raise it to 0.10 lot to meet the minimum.
- Reject this configuration and check an alternative within the limit.
- Remove the stop loss and keep 0.04 lot.
Check the answer and explanation
Reject this configuration and check an alternative within the limit.
Correct. 0.04 matches the step but is below the minimum. Do not force a trade by increasing risk.
Frequently asked
Should I remove the stop loss so the platform accepts an order?
Do not treat removing protection as a technical correction. It would create a different trade without the planned exit condition. First identify the error: check the quotation side, price increment, stop distance and availability of that order type. If the instrument conditions cannot fit your plan, declining the trade is a valid result. For an existing position, separately verify the last stop level actually accepted by the server; a rejected modification does not prove that new protection exists.
Does a zero Stops Level mean that every stop is allowed?
No. The MQL4 documentation states that zero MODE_STOPLEVEL can mean either no minimum distance or dynamic server-side control. That is a specific qualification for this MT4 field; do not automatically transfer it to every reading on another platform. Check the correct price side, permitted increment and current symbol conditions as well. If the rejection remains unexplained, retain the message and ask your provider which requirements applied to that particular operation.
Does the same error number mean the same thing in MT4 and MT5?
Do not use a single combined number list. MQL4 and MQL5 have separate catalogues, and a program can also print its own message. Begin with the platform, response type and source of the log entry. Only then compare it with the documentation. Timing and actual position state are still needed after identifying a code: translating the label correctly does not reconstruct the entire request history or establish whether a different order was executed.
Can I immediately resend an order after a connection error?
Reconcile the account state first. A lost response can leave uncertainty about the execution of the earlier request. Check current positions, pending instructions and deal history, including partial fills. Compare identifiers, symbol, quantity and time. If the outcome is still unknown, use the official support channel of the provider. Clicking again is not a way to confirm the state; it could increase exposure or create an opposite position on an account that records directions separately.
Sources & bibliography
-
MetaQuotes Ltd MQL4 Reference — Trade Server Return Codes · Separate MT4 error catalogue and meanings of 130, 131, 132, 133, 134 and 136. docs.mql4.com ↗
-
MetaQuotes Ltd MQL5 Reference — Trade Server Return Codes · The retcode field, invalid parameter replies, rejections and trading restrictions. www.mql5.com ↗
-
MetaQuotes Ltd MQL4 Reference — Symbol Properties · MODE_STOPLEVEL including its zero/dynamic qualification, MODE_FREEZELEVEL and symbol parameters. docs.mql4.com ↗
-
MetaQuotes Ltd MQL5 Reference — Symbol Properties · Separate point/tick-size/distance properties and minimum/step volume controls. www.mql5.com ↗
-
MetaQuotes Ltd MQL5 Reference — OrderSend · A successful function response does not prove execution; result and event checks. www.mql5.com ↗
