ForexBestRobots.com

Technical Guides · Forex education

Common MetaTrader 4 EA Errors and How to Fix Them

Diagnose an MT4 EA that is not working or trading with practical fixes for AutoTrading, licenses, DLLs, broker errors, quotes, volume and VPS issues.

Aug 28, 202618 min readReviewed by ForexBestRobots Editorial Team
MT4 Expert Advisor troubleshooting decision mapTechnical GuidesPractical, risk-aware guidance

Original illustration created for ForexBestRobots.com.

When an Expert Advisor does not trade, diagnose it in layers: installation, permissions, strategy conditions, then the exact broker response. Changing random inputs can hide the real problem and create new risk.

MT4 EA troubleshooting decision map
Start with permissions and environment before interpreting a broker error code.

First checks when an MT4 EA is not working

  1. Confirm the EA appears under Navigator → Expert Advisors and is attached to the intended chart.
  2. Confirm global AutoTrading and the EA’s Allow live trading permission are both enabled.
  3. Verify account, symbol suffix, timeframe, Magic Number, market hours and inputs.
  4. Open Terminal → Experts and Journal; record the full message and numeric code.
  5. Change one cause at a time, then verify the log again.

Error → meaning → cause → fix

ErrorWhat it means / why it happensHow to fix it
EA missing from NavigatorFile is in the wrong terminal or folderOpen Data Folder from that MT4 instance; move .ex4 to MQL4/Experts; refresh Navigator.
AutoTrading disabledGlobal or per-EA permission is offEnable the toolbar button and Allow live trading in EA properties.
Invalid account / licenseLogin, account type or bound license does not matchVerify broker server and license rules; contact vendor—do not bypass licensing.
DLL is not allowedEA called an external library without permissionEnable only for a trusted required DLL; MetaTrader virtual hosting cannot run DLLs.
Trading is not allowed · 133Broker, symbol or terminal disallows tradingCheck account permissions, market state, symbol trade mode and AutoTrading.
Market is closed · 132Requested instrument is outside tradable hoursWait for the broker session; check holidays and symbol schedule.
Not enough money · 134Free margin cannot support the requested positionReduce risk/volume; check leverage, margin and existing exposure.
Invalid stops · 130SL/TP or pending price violates broker distanceCheck StopLevel/FreezeLevel; normalize price and place stops farther away.
Invalid volume · 131Lot is below minimum, above maximum or off-stepUse broker min/max/lot step and normalize the requested volume.
Trade context busy · 146Another trade operation is still processingSerialize requests, wait briefly and retry with a bounded policy—not a tight loop.
Off quotes · 136 / requote · 138No executable quote or price movedCheck connection/spread; refresh price; use sensible slippage logic.
Connection problem · 6Terminal lost broker connectivityConfirm server, internet, login, firewall and VPS status; avoid repeated orders until restored.

EA loads correctly but opens no trades

This is not necessarily an error. Many EAs wait for a new bar, a specific session, maximum-spread conditions or several indicators to align. Confirm the documented symbol and timeframe, then look for log messages such as spread filter, trading window, maximum orders or news filter. Do not loosen every filter merely to force an entry.

Separate “not trading” from “cannot trade”

“No setup found” is strategy behavior. Error 133 or a disabled permission is an execution block. The remedy is different.

Invalid Account and Invalid License

Commercial EAs may bind a key to an account number, broker, platform or maximum number of activations. Check that the entered account is the one registered with the vendor and that the license server is reachable. Never download patched files or disable security controls; request a legitimate reset or activation from the vendor.

DLL is not allowed

Some EAs use external libraries for licensing or additional functions. Only enable DLL imports if the file comes from a trusted source and the official manual requires it. MetaTrader’s integrated virtual hosting rejects DLL use, so migrate such an EA only to a compatible conventional VPS approved by the vendor.

Stops, volume, margin and execution errors

Error 130 — Invalid stops

The stop-loss, take-profit or pending order may be too close to market, on the wrong side, or inside the broker’s freeze distance. Read the symbol specification and calculate with the instrument’s digits; do not solve it by removing protection.

Error 131 — Invalid trade volume

Normalize lots to the broker’s minimum, maximum and step. A computed 0.013 lot is invalid when the step is 0.01 unless rounded correctly, and rounding upward can exceed the intended risk.

Errors 136 and 138 — Off quotes and requotes

These usually reflect unavailable or changed prices. Check connectivity and spread, refresh the quote, and use bounded retry logic. Repeated immediate submissions can amplify the problem.

Error 146 — Trade context busy

MT4 processes a trade operation serially. Two charts or routines can collide. The EA should wait for the prior operation, re-check the market and stop retrying after a controlled limit.

VPS synchronization and duplicate-instance problems

After a MetaTrader virtual-hosting migration, configuration changes are not automatically remigrated. Synchronize again after changing charts or inputs. With a Windows VPS, confirm the terminal is open, logged in and set to start after reboot. In both cases, avoid trading the same account/EA/Magic Number from local and remote terminals simultaneously.

What to send support

Full error text and code
MT4 build and broker server
Symbol, timeframe and account type
Experts and Journal excerpt
EA version and input set
When the problem began

Remove passwords, license keys and personally identifying information before sharing screenshots or logs.

Official error reference

Numeric descriptions are based on the official MQL4 error-code reference. Broker implementation and EA-specific messages can add further conditions.