Home > Blog > MQL5 / MT5 Error Codes Explained — ERR_NO_MONEY, ERR_TRADE_DISABLED & More

MT5MQL5Error CodesTroubleshootingEALogs

MQL5 / MT5 Error Codes Explained — ERR_NO_MONEY, ERR_TRADE_DISABLED & More

Published: 2026-05-18Read time: about 4 min
This article reflects information as of its publish date. EA performance figures (PF, DD, annual return) change with live trading and re-validation — check the latest on the EA pages. See the latest EA results

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:

  1. Check the current margin level in MT5's Trade tab
  2. If margin is close to or below 100%, consider depositing additional funds
  3. Lower the EA's RiskPercent setting to reduce position size
  4. 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:

  1. Click the AutoTrading button in the MT5 toolbar to enable it (it should turn green)
  2. 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:

  1. Check the broker's stop level (minimum SL distance): right-click the symbol in MT5 → Specification → look for the Stops level field
  2. Ensure the EA's SL distance is greater than the stop level
  3. 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:

  1. Check the connection status in MT5's status bar at the bottom of the screen
  2. If disconnected, restart MT5
  3. Check your broker's server status page for outages
  4. 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:

  1. This is most common immediately after major news releases when server load is high
  2. The EA will typically retry on the next tick — no action required
  3. 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:

  1. Review the MaxSpreadPoints setting; this error is common when spreads widen significantly
  2. During and immediately after news releases, this is expected behavior — you can ignore it
  3. If it occurs frequently, slightly increase the MaxSpreadPoints value

"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:

  1. This is normal protective behavior — it is not an error
  2. Entry will resume automatically once the margin level recovers
  3. 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

PriorityErrorAction
CriticalERR_NO_MONEY (134)Deposit funds immediately
CriticalERR_TRADE_DISABLED (4109)Enable AutoTrading
WarningERR_INVALID_STOPS (130)Review SL settings
WarningERR_OFF_QUOTES (136) recurringCheck connectivity
NormalERR_MARKET_CLOSED (132) weekends onlyNo action needed
NormalERR_TRADE_TIMEOUT (128) occasionalNo action needed
NormalMargin level too lowNormal 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:

  1. Insufficient margin — Deposit more funds or reduce lot size
  2. AutoTrading off — Click the button to enable it
  3. Connection issues — Restart MT5 or check VPS network
  4. 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.

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.

Comments & questions