MQL5 / MT5 Error Codes Explained — ERR_NO_MONEY, ERR_TRADE_DISABLED & More
Contents
- How to Check the Experts Tab
- Common Error Codes and How to Fix Them
- ERR_NO_MONEY (Error Code 134)
- ERR_TRADE_DISABLED (Error Code 4109)
- ERR_MARKET_CLOSED (Error Code 132)
- ERR_INVALID_STOPS (Error Code 130)
- ERR_OFF_QUOTES (Error Code 136)
- ERR_TRADE_TIMEOUT (Error Code 128)
- TRADE_RETCODE_REJECT (Return Code 10006)
- "Margin level too low"
- "No signal on this bar" or "Wait for next bar"
- Error Priority Classification
- How to Read the Experts Tab Efficiently
- Filtering Logs
- Log File Location
- Summary
- FAQ
- Q: Where can I look up error codes?
- Q: Should I stop the EA if errors are appearing frequently?
- Q: I'm seeing an "Invalid account" error.
- Q: No errors are showing, but the EA isn't entering any trades.
MQL5 / MT5 Error Codes Explained — ERR_NO_MONEY, ERR_TRADE_DISABLED & More
Seeing ERR_NO_MONEY, ERR_TRADE_DISABLED, or other MQL5 errors in MT5's Experts tab can be alarming — but in most cases the cause and fix are straightforward. This article covers the most common error codes you'll encounter while running an EA, along with clear solutions for each.
How to Check the Experts Tab
Click the Expert tab at the bottom of MT5 to see a chronological log of all EA activity.
Log format:
2026.05.18 10:00:01.234 GOLD EMA ATR EA XAUUSD,H1: [ERROR] 130
Timestamp EA Name Symbol Timeframe Message
When an error appears, use the error code number to identify the cause.
Common Error Codes and How to Fix Them
ERR_NO_MONEY (Error Code 134)
Example messages: "Order failed: not enough money"
"ERR_NO_MONEY"
Cause: Insufficient margin — the EA cannot open a new position.
Fix:
- Check the current margin level in MT5's Trade tab
- If margin is close to or below 100%, consider depositing additional funds
- Lower the EA's
RiskPercentsetting to reduce position size - Manually close some open positions to free up margin
ERR_TRADE_DISABLED (Error Code 4109)
Example messages: "Trade is not allowed"
"AutoTrading disabled"
Cause: Automated trading is turned off in MT5.
Fix:
- Click the AutoTrading button in the MT5 toolbar to enable it (it should turn green)
- Go to Tools → Options → Expert Advisors → enable Allow Automated Trading, then restart MT5
This error often occurs when MT5 auto-starts after a VPS reboot.
📖 For the full permission chain (Options settings, per-chart Allow Algo Trading, investor password, and the 10027 vs 10026 difference), see AutoTrading disabled in MT5 — the complete fix.
ERR_MARKET_CLOSED (Error Code 132)
Example message: "Market is closed"
Cause: The EA attempted to enter a trade outside of market hours (weekend or holiday).
Fix: No action needed. The market is closed from approximately Saturday 00:00 to Sunday 17:00 (server time). Any entry attempt during this window will produce this error, but the EA will resume automatically on Monday.
📖 Seeing it on weekdays? Symbol trading sessions, server time, and close-only mode are covered in Market closed (10018/132) — causes and fixes.
ERR_INVALID_STOPS (Error Code 130)
Example messages: "Invalid stops"
"Stop level violation"
Cause: The SL (stop loss) or TP (take profit) value violates the broker's minimum stop level requirement.
Fix:
- Check the broker's stop level (minimum SL distance): right-click the symbol in MT5 → Specification → look for the Stops level field
- Ensure the EA's SL distance is greater than the stop level
- This error is most common during low-volatility periods when ATR values are very small
📖 For how stop levels actually work, the 10016 vs 130 difference, and the MQL5 code that prevents it for good, see Invalid stops (10016/130) — the complete fix.
ERR_OFF_QUOTES (Error Code 136)
Example message: "Off quotes"
Cause: No price quote received from the broker server — a connectivity issue.
Fix:
- Check the connection status in MT5's status bar at the bottom of the screen
- If disconnected, restart MT5
- Check your broker's server status page for outages
- Verify the network connection on your VPS
📖 For the difference vs requotes (10004/138), deviation tuning, and a retry implementation, see Off quotes & requotes (10021/10004) — the complete fix.
📖 Getting Unsupported filling mode (10030) right after switching brokers? That's a different problem — see Unsupported filling mode (10030) — how to fix it.
ERR_TRADE_TIMEOUT (Error Code 128)
Example message: "Trade timeout"
Cause: The order timed out due to server congestion or network latency.
Fix:
- This is most common immediately after major news releases when server load is high
- The EA will typically retry on the next tick — no action required
- If this happens frequently, review your VPS network environment or consider a different broker
TRADE_RETCODE_REJECT (Return Code 10006)
Example message: "Request rejected"
Cause: The broker rejected the order — typically due to spread exceeding limits or price moving too fast.
Fix:
- Review the
MaxSpreadPointssetting; this error is common when spreads widen significantly - During and immediately after news releases, this is expected behavior — you can ignore it
- If it occurs frequently, slightly increase the
MaxSpreadPointsvalue
"Margin level too low"
Example message: "Margin level too low. Skip signal."
Cause: The EA's UseMarginCheck = true setting detected that margin level has dropped below MinMarginLevel (e.g. 200%), so new entries are automatically blocked.
Fix:
- This is normal protective behavior — it is not an error
- Entry will resume automatically once the margin level recovers
- Root fix: deposit more funds or lower
RiskPercent
"No signal on this bar" or "Wait for next bar"
These are not errors — they are debug log entries.
"No signal. ATR=1245, EMA(50)=1998.23"
The EA evaluates the chart on every bar and logs when entry conditions are not met. This is normal operation.
Error Priority Classification
| Priority | Error | Action |
|---|---|---|
| Critical | ERR_NO_MONEY (134) | Deposit funds immediately |
| Critical | ERR_TRADE_DISABLED (4109) | Enable AutoTrading |
| Warning | ERR_INVALID_STOPS (130) | Review SL settings |
| Warning | ERR_OFF_QUOTES (136) recurring | Check connectivity |
| Normal | ERR_MARKET_CLOSED (132) weekends only | No action needed |
| Normal | ERR_TRADE_TIMEOUT (128) occasional | No action needed |
| Normal | Margin level too low | Normal protection at low margin |
How to Read the Experts Tab Efficiently
Filtering Logs
Right-click inside the Experts tab and select Filter to display logs for a specific EA or error type only.
Log File Location
MT5 log files are saved here:
C:\Users\[YourUsername]\AppData\Roaming\MetaQuotes\Terminal\[ID]\MQL5\Logs\
Files are created automatically by date. Open this folder when investigating errors.
Summary
Most EA errors fall into four categories:
- Insufficient margin — Deposit more funds or reduce lot size
- AutoTrading off — Click the button to enable it
- Connection issues — Restart MT5 or check VPS network
- Normal behavior — No action needed (weekend market close, spread-avoidance, etc.)
Make it a habit to check the Experts tab daily so you can quickly catch critical errors (codes 134 and 4109) before they cause problems.
FAQ
Q: Where can I look up error codes?
The official MQL5 documentation at mql5.com has a complete list of error codes. You can also search from MT5's built-in help (press F1).
Q: Should I stop the EA if errors are appearing frequently?
If ERR_MARKET_CLOSED (132) or ERR_TRADE_TIMEOUT (128) appear occasionally, there is no need to stop the EA. However, if ERR_NO_MONEY (134) repeats, pause the EA, review your margin situation, and restart once resolved.
Q: I'm seeing an "Invalid account" error.
Your MT5 login credentials (server name, login ID, or password) may be incorrect. Go to File → Open an Account to log in again.
Q: No errors are showing, but the EA isn't entering any trades.
If there are no errors and no entries, the EA is simply waiting for its entry conditions to be met — this is perfectly normal. EAs do not enter on every candle; they enter only when all conditions align. Give it some time. An H1 EA entering one to three times per day is operating normally.
Related
2026-07-07
AutoTrading Disabled in MT5: Fix Retcodes 10027 & 10026 (EA Not Trading)
2026-07-07
Invalid Stops in MT5: Fix Retcode 10016 & MT4 Error 130
2026-07-07
Market Closed in MT5: Fix Error 10018 & 132 (Even on Weekdays)
2026-07-07
Off Quotes & Requote in MT5: Fix Errors 10021 / 10004 (and MT4's 136 / 138)
5-Day Email Course (Free)
Get one email a day covering the essentials of FX automated trading, how to read backtests correctly, and tips for choosing a broker.
* Privacy strictly protected. You can unsubscribe at any time.