The short answer
A gold trade that closes “by itself” was almost always closed by one of six things: your stop-loss or take-profit (often triggered by the spread on a sell trade), a margin stop-out, a contract or order expiry, the broker’s own rules (Friday or holiday closures, margin changes), an expert advisor, or a manual close you forgot or that came from another device.
Your platform records the reason. In MT5 open Toolbox → History, find the trade and check the close price, time and comment. The table below tells you what each clue means.
The six reasons at a glance
| Reason | Clue in your history | Typical situation |
|---|---|---|
| Stop-loss hit | Comment [sl], close at or beyond your SL | Normal stop, or spread spike on a sell |
| Take-profit hit | Comment [tp] | Target reached on bid (buy) or ask (sell) |
| Stop-out | Comment so or “stop out”, Journal shows margin level | Equity fell too far against used margin |
| Expiry | Comment mentions expiry; symbol has a month code | Futures-based gold CFD or a pending order expired |
| Broker rules | Broker email or notice; often Friday or before holidays | Account-type rules or margin changes |
| Expert advisor or other device | EA comment or magic number; mobile login | An EA or you on another device closed it |
1. Your stop-loss or take-profit was hit, on the spread
Charts on MT4 and MT5 show the bid. A sell trade’s stop-loss and take-profit are checked against the ask, which is above the bid by the spread. When the spread widens, at the 5:00 pm New York rollover, the Sunday open or around news, a short’s stop can trigger while the bid candle stays below it.
Illustrative example: short at $4,000 with a stop at $4,006. Near rollover the bid reaches $4,004.80 and the spread widens to $1.40. The ask is $4,006.20, so the stop triggers. The chart never touched $4,006. Full explanation and fixes: stop-loss hit but price didn’t touch and gold spread widening at rollover.
2. Margin stop-out
Your margin level is equity ÷ used margin × 100. When losses push it down to the broker’s stop-out level, the platform closes positions automatically, usually the biggest loser first.
Illustrative example with a 50% stop-out level (levels vary by broker and region):
| Item | Value |
|---|---|
| Balance | $1,000 |
| Position | 0.50 lot XAUUSD at $4,000 |
| Margin used at 1:500 | 0.50 × 100 × $4,000 ÷ 500 = $400 |
| Stop-out when equity falls to | 50% × $400 = $200 |
| Loss that triggers it | $800 = $16 against you (0.50 lot = $50 per $1) |
A $16 move is well under gold’s typical day: on COMEX futures the median daily range over the past year was about $96. Check your own numbers with the gold margin calculator and read margin call and stop-out on gold for the full mechanics.
A stop-out closes at the market price at that moment, often in a fast market, so the loss can be larger than you expected. It is the worst way for a trade to end. A stop-loss you choose is always better than one your margin chooses for you.
3. Expiry
- Futures-based gold CFDs (symbols with a month code, such as a December contract) have an expiry date. Open positions are closed at expiry, or the broker requires you to close or roll them. Spot XAUUSD normally has no expiry.
- Pending orders can expire too. In MT4 and MT5 you choose Good till cancelled, Today or a specified time. “Today” orders vanish at the end of the trading day.
4. Broker or account rules
Some account types require positions to be flat before the weekend or certain events, and some brokers raise margin requirements before weekends and holidays, which can push a stretched account into stop-out at the Friday close or the Sunday open. Weekend gaps can do the same; in our data the largest Monday gap in gold futures was $116.30 (1 March 2026). See gold Monday gaps.
5. An expert advisor, copier or another device
If an EA, trade copier or signal service runs on your account, it can close trades on its own rules. The history comment or “magic number” usually shows it. Also check whether you or someone else is logged in on a phone or tablet. Our EA and bots checklist covers what to ask before running one.
How to find out what happened: step-by-step
- MT5: Toolbox (Ctrl+T) → History → right-click → Positions. Note the close time, price and comment.
- Journal tab: find the same timestamp. Stop-outs and order triggers are logged.
- Compare with the chart: turn on the ask line (F8) and go to M1 at the close time.
- Check the calendar: was it rollover, the Sunday open or a release? The gold economic calendar and market hours tool help.
- Check emails from your broker for margin or holiday notices.
- If none of these explain it, ask your broker for the trade report with the tick data at that time.
If you still think the close was wrong
Most automatic closes have a clear reason. If yours doesn’t, contact your broker with:
- The position number (ticket) from the History tab.
- The close time and price, and your SL/TP at that moment.
- A screenshot of the M1 chart with the ask line on, at that time.
- The Journal lines for that minute.
- A clear question: “Please confirm what triggered this close and send the tick prices for that minute.”
Keep it factual. A broker can check its server logs in minutes, and a precise question gets a precise answer.
How to prevent it
- Keep your margin level high: use a small share of your account per trade. The position size calculator sizes by risk, not by what margin allows.
- Leave room for the spread on short trades.
- Know your account’s stop-out level and weekend rules.
- Use spot XAUUSD unless you deliberately trade a dated contract.
- Follow a written risk management plan.
More quick fixes are in gold trading problems solved.
Get a second opinion
Post your history screenshot in the XAUUSD Global community and traders will help you work out exactly why it closed. The first month is free, then $19.99 a month.
Educational content only, not financial advice. Trading gold with leverage carries a high risk of loss. Stop-out levels, margin rates and account rules differ by broker and region.
Frequently asked questions
Why did my gold trade close by itself?
The most common reasons are: your stop-loss or take-profit was hit (often on the spread, without the chart touching it), your margin level fell to the broker’s stop-out level, a futures-based gold CFD expired, the broker closed positions under its own rules, or an expert advisor closed it. Your history tab shows which.
How do I see why a trade closed in MT5?
Open the Toolbox (Ctrl+T) → History, right-click → Positions, and look at the close price and the comment column. Tags such as [sl], [tp] or ‘so’ (stop out) show the reason. The Journal tab also records the event with a timestamp.
What is a stop-out on gold?
A stop-out is when the broker closes your positions automatically because your margin level (equity divided by used margin, as a percentage) has fallen to its stop-out level. Levels differ by broker and region. The largest losing position is usually closed first.
Why did my take-profit trigger before the chart reached it?
If you were short, your take-profit was checked against the ask, which is above the bid shown on the chart. If you were long, a spread spike shouldn’t trigger a take-profit early, but small differences between your broker’s feed and another chart can. Compare with your broker’s own chart.
Can a broker close my gold trade on Friday?
Some account types, mainly certain funded or special accounts, require positions to be closed before the weekend, and some brokers raise margin requirements before weekends or holidays, which can trigger stop-outs. Check your account terms.
Do pending orders expire?
They can. In MT4 and MT5 you choose an expiry when placing a pending order: good till cancelled, today, or a specific time. An order set to expire today disappears at the end of the trading day if it hasn’t triggered.
Sources and further reading
- MetaTrader 5 Help — Trading operations: basic principles — Order types, and which price (bid or ask) triggers each order and stop
- Investor.gov — Stop order — How stop orders work, and their limits in fast markets
- CFTC — Foreign Currency (Forex) Fraud advisory — Warning signs of trading scams and unrealistic promises
External sites are independent of XAUUSD Global. Check dates and data yourself.