ForexBestRobots.comCompare EAs →
EN

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.

18 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.
Trade disabled · 133The server rejects trading for the account or symbol.Check the symbol’s trade permissions and account restrictions with the broker. Diagnose terminal permissions separately.
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-order price violates the applicable price or distance rules.Check current Bid/Ask, order direction, price precision and Stops Level. Recalculate position size if the stop distance changes.
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 price may be too close to the market, on the wrong side, or improperly normalized. 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.

Separate server restrictions from terminal permissions

Error 4109 means trading is not allowed for the program: check the EA’s Allow live trading setting and global AutoTrading. Error 4112 means automated trading is disabled by the server. Error 133 concerns a server trading restriction. These are different checks; switching the local toolbar button cannot remove a broker restriction.

Error 65 is an invalid-account response from the trading server. A vendor’s “invalid license” message can instead come from its own account binding, subscription or activation service. Record the exact message and source before choosing whom to contact.

Handle uncertain results and dynamic stop rules

After trade timeout 128, the request’s outcome may be unknown. Reconcile open orders, pending orders and recent history before retrying. Match ticket information where available, then symbol, Magic Number, side, volume and time. An immediate repeat can create a second order if the first request succeeded.

A Stops Level of 0 can mean no fixed minimum or a dynamic server rule; it does not guarantee that every stop will be accepted. Freeze Level governs restrictions near the market on modifying, cancelling or closing orders. Check it separately. Do not widen a stop merely to silence Error 130 without checking the new cash risk.

MQL4 error codes and symbol properties define these distinctions.

Official error reference

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