An order is the instruction you give your broker: buy or sell, now or when price reaches a level. MetaTrader 5 has two market orders and six pending orders, and mixing up a Buy Limit with a Buy Stop is one of the most common beginner mistakes. Here you will see how each one works, at what price it fills and what happens when the market gaps.
Market orders
A market order buys (Buy) or sells (Sell) at the best price available right now. It fills almost instantly and is the only way to get in "now". In exchange, you do not control the exact price: between sending the order and the broker filling it, price can move a few points. That difference is slippage, which we cover in spread, slippage and commissions.
Buys open at the Ask price (the higher of the two you see) and sells at the Bid (the lower one). The gap between them is the spread.
The six pending orders
A pending order waits on the server until price reaches a level you set. The rule that keeps them apart: Limit orders wait for a better price than the current one; Stop orders wait for a worse one.
| Order | Where it goes | What it is for |
|---|---|---|
| Buy Limit | Below price (e.g. $1,990) | Buying cheaper if price pulls back. |
| Sell Limit | Above price (e.g. $2,010) | Selling higher if price rises. |
| Buy Stop | Above price (e.g. $2,010) | Buying only if price breaks out upwards. |
| Sell Stop | Below price (e.g. $1,990) | Selling only if price breaks down. |
| Buy Stop Limit | A stop level above and a limit below it | On the breakout, place a Buy Limit to buy the pullback. |
| Sell Stop Limit | A stop level below and a limit above it | On the breakdown, place a Sell Limit to sell the bounce. |
The first four also exist in MetaTrader 4; the two Stop Limit orders are specific to MetaTrader 5. We go through the other differences in MT4 vs MT5.
Which price triggers each order
This detail explains many orders that "did not fill" even though the chart touched the level. The MetaTrader 5 chart plots the Bid price by default, but:
- Buy Limit and Buy Stop trigger when the Ask reaches the level.
- Sell Limit and Sell Stop trigger when the Bid reaches the level.
If you place a Buy Limit at $1,990 and the spread is $0.30, the Bid has to drop to $1,989.70 for the Ask to touch $1,990. On the chart you will see the candle reach your level and the order will still be waiting. You can turn on the Ask line in the chart properties to see it.
Stop loss and take profit are orders too
The stop loss and take profit are orders attached to an open position and stored on the broker's server, so they work even if you switch your computer off. On a buy, both trigger on the Bid, which is the price it closes at; on a sell, on the Ask.
The broker sets two limits for each instrument: the stops level (minimum distance between price and your orders) and the freeze level (close to price, the order cannot be modified). You can see them in the symbol specification.
MetaTrader 5's standard trailing stop does not live on the server: your terminal moves it. If you close MetaTrader, the stop stays where it was. That is why people running robots usually use a VPS.
Execution, filling and expiry
When you send an order, MetaTrader 5 applies three settings you rarely notice:
- Execution mode: depends on the broker. With instant execution you may get a requote if price changed; with market execution, the order fills at the available price.
- Filling policy: Fill or Kill (FOK) requires the whole volume to fill or nothing; Immediate or Cancel (IOC) fills what it can and cancels the rest; Return leaves the rest as an order. On gold with normal lot sizes, the whole order almost always fills.
- Pending order expiry: until you cancel it (GTC), today only, or until a specific date and time.
What happens when price gaps
Gold opens on Monday wherever it likes and can move several dollars in seconds on a release such as US payrolls (see the gold economic calendar). If price jumps past your level, the order type decides the outcome:
| Type | What happens |
|---|---|
| Stop (including stop loss) | Becomes a market order and fills at the first available price, which can be much worse than your level. |
| Limit (including take profit) | Fills at your price or better; if the gap goes your way, you may get out better than planned. |
| Stop Limit | When triggered it places a Limit; if price does not come back to that limit, it does not fill. |
That is why a stop loss limits a loss but does not guarantee it to the cent.
How trading robots use orders
An Expert Advisor sends the same orders you would, only automatically. Many breakout strategies use Stop orders (get in only if price confirms the move) and pullback strategies use Limit orders. The Strategy Tester report shows which order type each trade used, and it is worth testing with real tick data, because gaps and spread affect Stop orders more than Limit orders.
Frequently asked questions
What is the difference between a Buy Limit and a Buy Stop?
A Buy Limit goes below the current price and buys if price drops to that level. A Buy Stop goes above and buys only if price rises to it. A Limit waits for a better price; a Stop waits for a worse one that confirms the move.
What is a Buy Stop Limit order?
A MetaTrader 5 order with two levels: when the Ask reaches the stop level, a Buy Limit is placed automatically at the limit level below it. It is used to buy the pullback after a breakout.
Why didn't my order fill when price reached the level?
Most likely because the chart shows the Bid and buy orders trigger on the Ask. The difference is the spread. Turn on the Ask line on the chart to see the real trigger price.
Does the stop loss work with MetaTrader closed?
Yes. Stop loss, take profit and pending orders are stored on the broker's server. The standard trailing stop, however, is moved by the terminal and stops moving if you close it.
Does a stop loss guarantee the exit price?
No. When it triggers it becomes a market order, so in a price gap it can fill worse than the level you set.
The prices in this article are examples to explain how orders work. The exact behaviour (execution modes, filling policies, stops levels) depends on each broker and account. Leveraged gold trading, which on MetaTrader 5 brokers is usually done with CFDs, carries a high level of risk and you can lose some or all of your capital. Past or simulated results do not guarantee future results. This content is educational and is not financial advice.
AUREUM: automated rules on gold, with its backtest published
Software that runs two strategies on XAU/USD in your own MetaTrader 5 account, where every trade opens with its loss and profit limits already calculated. Its 2024–2026 backtest, with both strategies together, is published with its drawdowns: a maximum drawdown of 22.35% across 345 trades. It’s a simulation, not a live account, and trading leveraged CFDs can lose you money.
See the full report →