If you have ever clicked Buy, watched the dialog flash red and close, and then sat there with no position and no explanation, you have asked the question this article answers: why are my trades being rejected on MT5. The honest answer is that the platform did explain, in a number, and that number was on screen for about a second before the box disappeared.
MetaTrader 5 does not refuse orders at random. Every request you send to the trade server comes back with a return code, and MetaQuotes publishes the whole list. There are 41 of them. Most describe success or a technical fault, and a small handful account for nearly every rejection a retail gold trader will meet. Learning those few is a twenty minute job that saves years of guessing, and more to the point, two of them are the account warning you about something that matters long before the balance does.
Everything below is either read from the official code list or computed from published margin rules, with the arithmetic shown. There are no gold prices in this article, and nothing here is a view on where price is going.
Why are my trades being rejected on MT5, in one sentence
Because the trade server ran a check before accepting the order, the order failed that check, and the server sent back the code for the check it failed.
That is worth sitting with, because it reframes the problem. A rejection is not the platform being broken or the broker being hostile. It is a pre trade test, and the test result is information you asked for without realising it. The platform is strict about this on purpose: an order that cannot be funded, or whose stop sits inside a forbidden distance, is better refused at the door than accepted and then unwound.
The codes live in the trade server return code list in the MQL5 documentation, which is MetaQuotes’ own reference rather than a forum summary. If you only ever read one page about your platform, read that one.
The six codes that cover almost everything
Out of the 41 published codes, these are the ones that actually appear in a retail gold account, with the descriptions as the documentation words them.
10019, TRADE_RETCODE_NO_MONEY. “There is not enough money to complete the request.” This is the big one, and the rest of this article is largely about it.
10016, TRADE_RETCODE_INVALID_STOPS. “Invalid stops in the request.” Your stop loss or take profit sits closer to the current price than the symbol’s minimum allowed distance, or on the wrong side of it entirely. Gold often carries a wider minimum distance than a currency pair does, which is why the same stop distance that worked on EURUSD is refused on XAUUSD.
10014, TRADE_RETCODE_INVALID_VOLUME. “Invalid volume in the request.” The lot size is below the symbol minimum, above its maximum, or not a multiple of the step. A size calculated to three decimal places on a symbol that steps in hundredths will be refused.
10018, TRADE_RETCODE_MARKET_CLOSED. “Market is closed.” Gold has a daily break and a weekend. The chart still shows the last candle, which makes a closed market look like an open one.
10015, TRADE_RETCODE_INVALID_PRICE and 10021, TRADE_RETCODE_PRICE_OFF. “Invalid price in the request” and “there are no quotes to process the request.” These cluster around the minutes when a release lands and the spread blows out. The price you clicked is already gone.
10004, TRADE_RETCODE_REQUOTE. A requote rather than a flat refusal, and a normal response to a fast market on an execution model that offers you the new price instead of filling you at a stale one.
Two more are worth recognising because they look like faults and are not. 10027, TRADE_RETCODE_CLIENT_DISABLES_AT, means autotrading is switched off in your own terminal, the button at the top. 10026 is the same thing disabled at the server end. Neither is a market problem, and 10027 in particular wastes a lot of people’s mornings.
The code that is not a technical problem
Five of those six are configuration or timing. Fix the stop distance, round the lot size, wait for the session, and they go away.
10019 is different in kind. “Not enough money” is not a setting you got wrong, it is a statement about the state of your account relative to the position you already hold, and it tends to arrive at the exact moment people are least inclined to read it carefully, which is while an existing trade is going against them and they want to add.
Here is the mechanism, in the order the platform applies it. Your equity is the balance plus or minus the profit on open positions. Your used margin is what the open positions have locked up. Free margin is equity minus used margin, and free margin is what a new order is checked against. Crucially, equity moves with the market, and used margin does not. So an adverse move does not merely cost you money on paper, it eats the capacity to do anything else.
How far the market has to move before MT5 starts refusing you
This can be computed exactly, so let us compute it rather than describe it.
Take an account funded with twice the initial margin of a single gold position, which is a reasonable, not especially reckless, starting point. The initial margin as a share of the position’s notional value is one hundred divided by the leverage. At the European retail cap for gold of 20:1, that is 5 per cent.
Free margin reaches zero when the loss on the open position equals the spare margin, which in this case is one times the initial margin. That means an adverse move of 5 per cent of notional at 20:1. From that point MT5 returns 10019 for anything new you try to open.
Keep going and you reach the close out. Under the ESMA product intervention measures agreed on 27 March 2018, a provider must close a retail client’s positions when equity falls to 50 per cent of the initial required margin. On the same account that is an adverse move of 7.5 per cent of notional.

Read the gap between the two bars, because the gap is the whole point. At 20:1 you get 2.5 percentage points of warning between the first refusal and the forced close. At 200:1 you get a quarter of a point. The rejection is an early warning system whose lead time shrinks with leverage, and at high leverage it effectively stops being a warning at all.
The assumptions are stated so you can check them: one position, an account funded with twice its initial margin, no swap and no commission, and moves measured as a percentage of the position’s notional value rather than as a price. Costs make the thresholds arrive sooner, never later. The numbers come from the ESMA close out rule and ordinary arithmetic, not from anybody’s forecast.
What that code is actually telling you
So when the platform says there is not enough money, it is reporting something more useful than a failed click. It is telling you that your existing position has consumed your reserve, and that you are now closer to the close out than to a fresh start.
Which makes the common reaction, reducing the lot size until something finally goes through, the exact wrong move. A smaller order squeezed through on the last of your free margin does not reduce risk. It adds a second position to an account that has already told you it is out of capacity, and it brings the close out nearer for both.
The useful reaction is to treat 10019 as a stop sign with a number attached. Nothing about the rejected order needs fixing. What needs attention is the position already open, and the only two things that genuinely help are reducing that position or adding funds, with the first being the one you control immediately. If you want the fuller version of what happens when neither occurs, I wrote it up in what a blown trading account actually means, which traces the same arithmetic to its end.
Reading the number instead of the red box
MT5 does show you the code, it just shows it briefly and in small type. There are two reliable places to find it after the fact.
The Journal tab at the bottom of the terminal, next to Trade and History, logs every request and every server response with its code and timestamp. The Experts tab does the same for anything sent by an automated system. Neither clears when the dialog does, so when an order vanishes without explanation, that is where the explanation is sitting.
The habit worth building is simple. When something is refused, do not click again. Open the Journal, read the number, and look it up. The second click is how a configuration problem becomes a position you did not plan, especially when the first failure was a requote and the price has moved in between.
If your gold symbol is missing from Market Watch entirely, that is a different and more boring problem, and adding XAUUSD in MT5 covers it.
The rejections you should want
It is worth saying plainly that most of these refusals are the platform doing you a favour.
Invalid stops means your stop was too close to price to be accepted. Had it been accepted, it would have been the first thing taken out by ordinary noise. Invalid volume usually means a position size calculator produced a figure the symbol cannot trade, and rounding it yourself in a hurry is how people end up with ten times the size they intended. Market closed means the thing you were about to react to happened when nobody could act on it, which is information about the news, not about your platform.
And 10019 means the account is nearer the edge than you thought. A trader who has read the risk management guide and keeps position sizes small enough that free margin is never the binding constraint will see this code roughly never. That is not a coincidence, it is the definition of having room.
What this article does not say
It does not say the thresholds above apply to your account. Leverage caps differ by jurisdiction, brokers may set a close out level stricter than the regulatory floor, and some set margin requirements that rise as position size grows. The arithmetic is general, the inputs are yours, and your broker’s terms are the ones that bind.
It does not say a rejection is always benign. Repeated unexplained refusals during normal, liquid hours, especially alongside withdrawal delays, are a different kind of signal, and the place to start is the broker rather than the platform. Choosing that broker carefully in the first place is the cheapest protection available, which is why how to pick a broker for gold trading exists.
And it does not tell you what size to trade or when. That is not what this channel does.
Get the free Gold Empire survival sheet, a one-page guide to protecting your account through the kind of market this article describes. One email, no spam, unsubscribe anytime.
Frequently asked questions
Why are my trades being rejected on MT5 when I have money in the account?
Because the check is against free margin, not balance. Free margin is equity minus the margin your open positions have locked up, and an open loss reduces equity while leaving used margin unchanged. An account can show a healthy balance and still have nothing available to open with. Code 10019 is reporting the second number, not the first.
What does error 10019 mean in MT5?
TRADE_RETCODE_NO_MONEY, which MetaQuotes documents as “there is not enough money to complete the request”. It means the trade server refused the order because free margin did not cover what the new position required.
Why does MT5 reject my stop loss?
Code 10016, invalid stops, means the stop sits closer to the current price than the symbol’s minimum permitted distance, or on the wrong side of price for the order type. Gold commonly has a wider minimum distance than major currency pairs, so a stop that is acceptable on one symbol can be refused on another in the same terminal.
Is a rejected order the same as a failed order?
No. A rejection happens before anything is opened, so no position exists and no money has moved. That is different from an order that is accepted and then filled at a worse price than you clicked, which is a fill problem rather than a rejection. I covered that case separately in what happens when a market order is not filled at your price.
Should I lower my lot size until the order is accepted?
That is the most common response and the one most likely to hurt. If free margin is the binding constraint, the message is about the position you already have. Opening a smaller second position on the last of your available margin moves the close out level closer rather than further away.
Where do I see the actual rejection code?
The Journal tab in the terminal window logs every request and the server’s response, with the code and a timestamp, and the Experts tab does the same for automated orders. Both keep their history after the pop up disappears.
What Gold Empire actually does
Gold Empire is a free channel about surviving in gold rather than getting rich in it. There is no signal service here and nothing is sold on the promise of a return. The free Gold Survival Sheet is a single page on protecting an account, and the only thing it asks for is an email address you can unsubscribe from in one click. Everything else, including the risk management guide and how much to risk per trade, is simply published.
The model is deliberate. Follow along for free, check the arithmetic yourself, and decide on your own. If a piece of writing ever makes you feel you must act this minute, that is a reason to distrust the writing, mine included.
About the author
Matthew writes Gold Empire. He spent a long time believing that a rejected order was the platform misbehaving, and only read the return code list after a morning of clicking Buy at a market that had been closed for six hours. He now treats a refusal as the cheapest message an account ever sends, because it arrives before the money does. You can read more about the approach on the about page.
This article is educational and is not financial advice. Trading gold carries a high risk of losing money rapidly, and no entry, stop or target discussed should be treated as a signal. The return codes, their numbers and their descriptions are quoted from MetaQuotes’ published MQL5 trade server return code documentation, and the 20:1 retail leverage cap for gold and the close out at 50 per cent of initial margin are quoted from the European Securities and Markets Authority’s product intervention measures agreed on 27 March 2018, both as linked. The margin thresholds are my own arithmetic from those published rules, with the assumptions stated in the text, and they exclude swap and commission. Your own broker’s terms and your own jurisdiction govern your account. Decide your own risk, and never trade money you cannot afford to lose.
One step first
Where should we send the Gold Survival Sheet?
Leave your email and we will send the free one page checklist, then take you straight to the Telegram channel.
No cost and no obligation. Educational only, not financial advice, and nothing here promises a return. Unsubscribe any time in one click.






















