MT4 Common Errors: Fix Every Issue (2026)
Most MT4 errors have simple fixes: Trade Context Busy = wait 10 seconds or restart MT4; Invalid Stops = move SL/TP further from price; No Connection = check internet, try different server; Not Enough Money = reduce lot size; Off Quotes = increase maximum deviation. This guide covers every common error with exact solutions.
After years spent helping traders configure their Expert Advisors, I've run into pretty much every MT4 error message there is, and about 95% of them have straightforward fixes once you understand what the message actually means. The trouble is that MetaTrader 4's error messages are often cryptic and unhelpful, and the platform mixes plain-English pop-ups with numeric codes buried in the Experts and Journal tabs that most traders never learn to read. This guide translates every major error into plain language, with the exact steps to fix each one, organized by category so you can find what you need fast, plus a full numeric error-code reference and guidance on when a problem is really your broker's issue rather than something you can fix in your terminal.
In This Guide
Quick Reference: All MT4 Errors
Bookmark this table for instant reference when you encounter an error:
| Error Message | Category | Quick Fix |
|---|---|---|
| No Connection | Connection | Check internet, try different server |
| Common Error | Connection | Wrong server or expired credentials |
| Old Version | Connection | Download latest MT4 from broker |
| Trade Context Busy | Trading | Wait 10 seconds, restart if needed |
| Invalid Stops | Trading | Move SL/TP further from price |
| Not Enough Money | Trading | Reduce lot size or deposit funds |
| Off Quotes | Trading | Increase max deviation, retry |
| Market Closed | Trading | Wait for market hours |
| Trade Disabled | Account | Contact broker |
| EA Not Trading | EA | Check AutoTrading + permissions |
Understanding MT4 Error Codes
MetaTrader assigns every trade-related error a numeric code internally, even when the terminal displays a plain-English message like "Off Quotes" or "Invalid Stops." If you're running an EA, that number is usually printed in the Experts or Journal tab right next to the message, and it's the fastest way to look up exactly what happened when the pop-up text alone isn't specific enough. MetaQuotes publishes the full, current list in its official trade server return code documentation, but the table below covers the codes gold traders run into most often.
| Code | Error Name | What It Means |
|---|---|---|
| 128 | Trade Timeout | Server did not respond to the order request in time |
| 129 | Invalid Price | The price quote used for the request is no longer valid |
| 130 | Invalid Stops | SL/TP is closer to price than the broker's minimum stop level |
| 131 | Invalid Trade Volume | Lot size is outside the broker's min/max/step range |
| 132 | Market Closed | Trading attempted while the symbol is closed |
| 133 | Trade Disabled | Trading switched off for this account or symbol |
| 134 | Not Enough Money | Free margin is insufficient for the requested position |
| 135 | Price Changed | Price moved between the request and execution |
| 136 | Off Quotes | Broker could not fill at the requested price |
| 137 | Broker Busy | Trade server is overloaded with requests |
| 138 | Requote | Broker offers a new price instead of filling the old one |
| 140 | Long Positions Only Allowed | Symbol restricted to buy orders only |
| 141 | Too Many Requests | Too many orders sent in a short window |
| 145 | Modification Denied | SL/TP change too close to the current market price |
| 146 | Trade Context Busy | Another trade operation is already in progress |
| 148 | Too Many Orders | Account reached the broker's open/pending order limit |
These are the classic MT4 trade-server codes; MQL4 also has a separate family of runtime error codes for problems inside an EA's own code, covered in the EA-specific errors section below.
Connection Errors
No Connection / Connecting...
This is the most common MT4 error. The status bar at the bottom shows "No connection" or perpetually "Connecting..."
Causes and fixes (in order of likelihood):
- Internet down: Check your internet connection with a browser
- Wrong server: Go to File → Login to Trade Account, try a different server from the dropdown
- Firewall blocking: Add terminal.exe to your firewall and antivirus exceptions
- Broker maintenance: Check your broker's website for scheduled downtime
- Expired credentials: Demo accounts expire after a set period, so contact your broker for new ones
- VPN interference: Disable VPN temporarily to test
If you've ruled out everything above and connection drops keep recurring, test your latency to the broker's trade server. The server address is listed in the Market Watch symbol's Specification window or your account opening email; a basic trace route or ping test from a command prompt will show whether the round trip is fast and stable. Latency above roughly 150-200ms, or frequent packet loss, tends to show up in MT4 as random "Connecting..." states even when ordinary browsing feels fine. That's one of the main reasons a VPS hosted close to the broker's data center outperforms a home connection for unattended EA trading, since it removes your home ISP, Wi-Fi, and router entirely from the equation.
Common Error
Despite the vague name, "Common Error" usually means authentication failed. Your login, password, or server selection is incorrect. Re-enter your credentials carefully from the email your broker sent. It can also appear if your broker recently migrated servers and the old server entry in your terminal's server list is now stale; scroll through the full server list under File → Login to Trade Account rather than assuming your usual entry still points to the right place.
Old Version
Your MT4 build number is outdated. Download the latest version from your broker's website (not from random sites) and install it over your existing installation. Your EAs, settings, and trade history are preserved during the update. Brokers sometimes force this by disabling older builds server-side for security reasons, so if the update prompt reappears repeatedly, don't keep dismissing it; an outdated build can eventually lose the ability to connect at all.
Trading Errors
Trade Context Busy (Error 146)
MT4 can process only one trading operation at a time. This error occurs when:
- Multiple EAs attempt to trade simultaneously
- You manually trade while an EA is executing
- A script is running alongside an EA
- The previous trade request has not completed yet
Fixes:
- Wait 5-10 seconds and retry the trade
- If persistent, restart MT4
- Avoid manual trading while EAs are active
- If running multiple EAs, stagger their trading intervals
Invalid Stops (Error 130)
Your stop loss or take profit level is too close to the current market price. Every broker enforces a minimum stop distance.
How to fix:
- Check your broker's minimum stop distance: right-click the symbol in Market Watch → Specification → look for "Stops level"
- Move your SL/TP at least that many points away from the current price
- For XAUUSD, minimum stops are typically 50-100 points (5-10 pips)
- If using an EA, increase the SL/TP distance in the EA settings
Not Enough Money (Error 134)
Insufficient free margin to open the requested position size. Free margin is the portion of your account equity not already tied up as collateral for open positions; see Investopedia's explainer on margin if the mechanics are new to you. Gold's margin requirement per lot tends to run higher than most forex pairs because of its price and typical volatility, so an account that comfortably holds several EUR/USD lots can still hit this error on a much smaller XAUUSD position.
Fixes:
- Reduce your lot size (see our lot size guide for $1,000 accounts)
- Close existing positions to free up margin
- Deposit additional funds
- Switch to a broker with higher leverage (if appropriate)
Off Quotes (Error 136)
The price moved too far between your order request and broker execution. Common during high-volatility events like NFP releases or market opens. This kind of gap between the price you requested and the price you actually get is generally referred to as slippage, and it isn't unique to MT4 or to any one broker; it's a normal feature of trading fast-moving instruments like gold electronically.
Fixes:
- Increase "Maximum deviation" in the order window (5-20 points for gold)
- Retry the trade, since it often goes through on the second attempt
- Avoid trading during major news events when spreads are wide
- If using an EA, the EA should have built-in retry logic for this error
Requote (Error 138)
A requote is closely related to Off Quotes but technically different. Instead of rejecting your order outright, the broker offers you a new price and waits for confirmation before filling it. Requotes are more common with dealing-desk brokers, and less common with ECN or STP brokers running market execution, since those typically fill at whatever price is currently available within your deviation setting rather than pausing to ask. If requotes happen constantly outside of news spikes, it's worth asking your broker directly whether your account is on instant execution or market execution, since the two behave differently under the hood even though the order window looks the same.
Broker Busy / Trade Timeout (Errors 137 and 128)
Both of these point to the broker's trade server rather than your terminal. Error 137 means the server received your request but couldn't process it fast enough to respond, and Error 128 means it never responded within the timeout window at all. Neither is something you can fix locally beyond waiting a few seconds and retrying. If they show up repeatedly outside of high-volatility news windows, check your broker's status page or ask their support desk whether their infrastructure is having issues; a broker whose servers can't keep up during normal gold trading hours is worth reconsidering if you're relying on an EA to execute unattended.
Market Closed (Error 132)
You are trying to trade outside market hours. Gold (XAUUSD) trades approximately 23 hours per day on weekdays, with a brief daily break, because it's quoted continuously across overlapping global sessions the way most major currency pairs are; the World Gold Council has background on how the broader gold market operates around the clock. It is closed on weekends (Friday ~22:00 GMT to Sunday ~23:00 GMT), and brokers sometimes add a short extra buffer around the weekly close for their own settlement processes, so don't assume your broker's exact cutoff matches another broker's down to the minute.
Invalid Trade Volume (Error 131)
The lot size is outside your broker's allowed range. Check symbol specifications for minimum, maximum, and lot step values. Most brokers require lots in increments of 0.01. This error also appears if your calculated lot size rounds to a value the broker doesn't support, which is a common trap when position sizing is done with a spreadsheet formula rather than rounded to the broker's actual lot step.
EA-Specific Errors
EA Not Trading (Smiley Face but No Trades)
The EA is attached and permitted, yet it still isn't executing trades. Several different things can cause this. Our guide on fixing an EA that is not trading walks through a complete diagnostic checklist.
EA Shows Frowning Face
- AutoTrading button is disabled (not green): click it to enable
- "Allow live trading" is unchecked in EA properties
- "Allow DLL imports" is unchecked but required
- License validation failed: check the Experts tab for details
DLL Load Failed
- The .dll file is missing from MQL4/Libraries
- "Allow DLL imports" is not checked in EA properties
- Antivirus quarantined the DLL file, so add an exception for it
- 32-bit vs 64-bit mismatch: MT4 runs 32-bit, so the DLL has to match
Cannot Load EA (Error in Experts Tab)
- EA file is corrupted, so re-download it from your provider
- Wrong platform version: .ex4 files only run on MT4, not MT5
- Missing dependencies: check whether additional files (.mqh, .dll) are required
Common MQL4 Runtime Errors
Beyond the trade-server errors covered earlier, MT4 also throws runtime errors that originate in the EA's own code rather than the broker's response. Three you'll see referenced most often in the Experts tab:
- Array Out of Range (runtime error 4002): the code tried to read an array element that doesn't exist, usually after a data feed hiccup or a symbol with incomplete history
- Zero Divide: the code attempted to divide by zero, which can happen if a broker briefly returns a spread or price of 0 during a feed glitch
- Unknown Symbol: the EA is looking for a symbol name, often with a broker-specific suffix like XAUUSD.m or GOLD#, that doesn't match what's actually listed in your Market Watch
These are development-side issues rather than something you configure around. If a well-tested EA throws one only rarely, it's usually a transient data problem that clears up on its own; if it happens constantly, contact the EA's developer with the exact error text and code number from the Journal tab rather than just describing the symptom. The full list of MQL4 runtime error codes is documented on MQL5's reference pages, which cover both the MT4 and MT5 language variants.
Chart and Data Errors
Waiting for Update
The chart is not receiving price data. Right-click the chart and select Refresh, or close and reopen the chart. If it persists, the symbol may have been renamed or removed by your broker.
Symbol Not Found
The requested trading symbol is not available. In Market Watch, right-click and select "Show All" to display all available symbols. If XAUUSD is still missing, your account type may not support gold trading, so check with your broker.
No Data / Missing History
Historical price data is incomplete. Go to Tools → History Center (F2), find your symbol, and click Download. For EA backtesting, quality imported data matters a lot, so see our MT4 backtesting guide. Some brokers also cap how much history they store server-side for a given symbol, so if you need years of tick or M1 data and your broker's server only holds a few months, you may need to import a third-party history file instead of relying on the built-in downloader.
Account Errors
Trade Is Disabled
- Your broker has restricted trading on your account
- Market may be in pre/post-market hours
- Demo account may have expired
- Account may be set to "read-only" or "investor" mode
- Contact your broker to resolve
Invalid Account
Your login number, password, or server is incorrect. Re-enter credentials from your broker's email. Make sure you are selecting the correct server (live vs demo). If you recently opened a second account with the same broker, double-check you're logging into the account number you intend to trade, since it's easy to have a demo and live login saved side by side and mix them up.
MT4 vs MT5 Error Differences
If you also run MT5, or you're weighing a switch, it helps to know that error handling changed meaningfully between the two platforms. MT5 moved away from MT4's classic 128-148 trade-server codes toward a broader return-code system, and it separates order-send results from general runtime errors more cleanly than MT4 does. Some MT4-specific errors don't have a direct MT5 equivalent because the underlying execution model changed: MT5's default leans further toward market execution across brokers, so classic dealing-desk requotes show up less often than they do on MT4. Symbol-related errors also behave a little differently, since MT5 handles symbol properties and market depth data in a more structured way than MT4's older architecture.
If you're deciding which platform to run your gold EA on, our MT4 vs MT5 comparison covers the practical differences beyond just error handling, and MetaQuotes' own MetaTrader 5 platform page documents the current architecture in more detail. Neither platform is immune to the underlying causes covered in this guide; a broker with an overloaded trade server will produce timeouts and busy errors on MT5 just as it does on MT4, even if the exact code numbers differ.
When to Contact Your Broker vs Your EA Provider
Sorting errors into "broker problem" versus "EA problem" versus "local setup problem" saves a lot of back-and-forth. As a rule of thumb: connection errors (No Connection, Common Error, Broker Busy, Requote, Off Quotes) point to your broker's servers or your internet connection, so that's who to contact first. Parameter errors (Invalid Stops, Invalid Trade Volume, Not Enough Money) are almost always fixable on your end by adjusting settings or rechecking the symbol specification. EA-specific errors (DLL Load Failed, Cannot Load EA, or a runtime error tied to the EA's own code) belong with whoever built or sold you the EA.
If you're not sure which bucket an error falls into, check the Experts and Journal tabs first: a message referencing your broker's server name or a return code in the 128-148 range usually means broker or parameter, while a message referencing the EA's file name or a specific line of code usually means the EA itself. For anyone running Golden Viper, the built-in retry and error-handling logic already covers most of the transient trade-server codes on its own, so if you do need to reach out, having the exact error text and code number from the Journal ready will get you a faster answer. And when troubleshooting turns up a broker that won't explain repeated errors, is unresponsive to support tickets, or restricts withdrawals, that's a business risk beyond the technical fix; both the FTC and the CFTC publish guidance on spotting high-risk or fraudulent forex operations, worth a read if you're evaluating an unfamiliar broker rather than just fixing a known one.
Error Prevention Checklist
Follow these practices to minimize MT4 errors:
- Keep MT4 updated: install new versions as soon as your broker releases them
- Use a stable connection; a VPS works best for EA trading
- Monitor margin levels and keep usage below 50% of free margin
- Check the Experts tab regularly, since errors show up there first
- Save your EA presets so you can restore them quickly if settings are lost after an error
- Restart MT4 weekly to clear memory leaks and refresh connections
- Add MT4 to your firewall exceptions to prevent connection blocks
- Use proper lot sizes to avoid "Not enough money" errors
Running your EA on a VPS instead of a home computer eliminates a large share of connection-related errors, since a VPS positioned near your broker's server stays online 24/5 without depending on your home internet, your computer staying awake, or your power not going out. Our guide to running MT4 on a VPS walks through the setup. If you run more than one EA on the same account, each one needs its own magic number to avoid conflicts; our guide to running multiple EAs on one account explains how to prevent Trade Context Busy errors between them. Broker-specific symbol suffixes (XAUUSD.m, GOLD#, XAUUSDm) are also a frequent source of Unknown Symbol and Symbol Not Found errors; see our guide to MT4 symbol suffixes if your broker's gold symbol doesn't match what an EA or a tutorial expects. And if you check or manage positions away from your desk, the MT4 mobile app surfaces some of these errors a little differently than the desktop terminal, which is worth knowing before you assume something is broken.
| Setting | Recommended Value | Error It Helps Prevent |
|---|---|---|
| Maximum deviation / slippage | 5-20 points for gold | Off Quotes, Requote |
| Stop level buffer | Broker minimum + 10-20 points | Invalid Stops |
| Free margin usage | Keep 50%+ free at all times | Not Enough Money |
| Hosting | VPS with low-latency ping to broker | No Connection, Trade Context Busy |
| Magic number | Unique per EA or strategy | Trade Context Busy (multi-EA conflicts) |
| Symbol name | Match broker's exact suffix | Unknown Symbol, Symbol Not Found |
Frequently Asked Questions About MT4 Errors
What does Trade Context Busy mean in MT4?
It means MT4 is already processing another trading operation, since it can only handle one trade request at a time. This usually happens when multiple EAs trade at once, or when you place a manual trade while an EA is active. Wait 5-10 seconds and retry, or restart MT4 if it keeps happening.
Why does MT4 show Invalid Stops error?
It means your stop loss or take profit sits too close to the current price. Check your broker's minimum stop distance in the symbol's Specification window, then adjust your SL/TP so it's at least that far away.
How do I fix MT4 No Connection error?
Start by checking your internet connection, then try a different server through File, Login to Trade Account. Add MT4 to your firewall exceptions, and double-check that your credentials are correct and your demo account hasn't expired.
What causes Off Quotes error in MT4?
The price moved while your order was being executed, so the broker couldn't fill it at the price you requested. Try increasing the maximum deviation in the order window, or wait for calmer conditions before retrying.
Why does my MT4 show Old Version error?
Your MT4 build is out of date. Download the latest version from your broker's website and install it over your current setup; your EAs and settings will carry over.
What does Requote mean and how is it different from Off Quotes?
A requote means the broker rejected your original price and is offering you a new one to accept, which is common with dealing-desk brokers. Off Quotes means the broker rejected the order outright with no alternative price offered. Both are usually solved by increasing your maximum deviation setting, or by moving to a broker that uses market execution.
Why do I get an Array Out of Range or Zero Divide error?
These are MQL4 runtime errors coming from the EA's own code rather than your broker's response. Array Out of Range usually follows a data feed hiccup, and Zero Divide can happen if the broker briefly returns a price or spread of zero. If it shows up rarely, it's typically a transient data problem; if it happens constantly, send the EA's developer the exact error text and code number from the Journal tab.
Should I run MT4 on a VPS to avoid errors?
Yes, if you're running an EA unattended. A VPS positioned near your broker's trade server stays online 24/5 and removes the home-internet dropouts, sleep mode, and power outages that cause a large share of No Connection and Trade Context Busy errors on a home computer.
Do MT4 and MT5 show the same error codes?
No. MT5 uses a different, broader return-code system than MT4's classic 128-148 range, and its execution model leans further toward market execution by default, so dealing-desk requotes are less common there. Treat the numeric codes as platform-specific rather than interchangeable if you run both.
How do I know if an error is my broker's fault or my EA's fault?
Connection and trade-server errors (No Connection, Broker Busy, Requote, Off Quotes) point to your broker. Parameter errors (Invalid Stops, Not Enough Money, Invalid Trade Volume) are usually fixable on your end. Errors referencing the EA's file name or a specific line of code, such as DLL Load Failed or a runtime error, belong with the EA's developer.
Let Golden Viper EA trade gold for you
Automated XAUUSD trading for MT4 & MT5, verified live on Myfxbook. One-time $199, lifetime access.
Get Lifetime Access — $199