First, read the logs
Open the Terminal window in MT4 or the Toolbox in MT5 (Ctrl+T). The Experts tab shows messages from your EAs, and the Journal tab shows platform messages such as connection problems and rejected orders. The exact error text there usually points straight at the cause.
The EA doesn't appear in the Navigator
- Wrong folder — EAs belong in
MQL4\Experts(MT4) orMQL5\Experts(MT5) inside the data folder (File → Open Data Folder), not in the program's installation folder. - Wrong platform — an
.ex4file won't load in MT5 and an.ex5won't load in MT4. - Not refreshed — right-click Expert Advisors in the Navigator and choose Refresh, or restart the platform.
- Still zipped — extract
.ziparchives before copying the files.
The EA is attached but won't trade
Two switches must both be on: the platform-wide AutoTrading button (MT4) or Algo Trading button (MT5), and the EA's own permission — Allow live trading in MT4 or Allow Algo Trading in MT5, on the Common tab of its properties (press F7 on the chart). When either is off, MT4 reports error 4109 (trade not allowed) and MT5 reports 4752 (trading disabled for Expert Advisors).
- Check whether the market for that symbol is open — trades are rejected outside trading hours.
- Some symbols are close-only or disabled on certain account types; check Specification in Market Watch.
- Some brokers restrict automated trading on particular accounts. Ask your broker if every switch is on and trades still fail.
Orders rejected by the broker
| Error | Platform code | What usually causes it |
|---|---|---|
| Invalid stops | MT4 130 · MT5 10016 | Stop-loss or take-profit too close to the price (inside the broker's minimum stop level) or on the wrong side |
| Invalid volume | MT4 131 · MT5 10014 | Lot size below the minimum, above the maximum, or not a multiple of the volume step |
| Not enough money | MT4 134 · MT5 10019 | Insufficient free margin for the position size |
| Market closed | MT4 132 · MT5 10018 | Trading attempted outside the symbol's session |
Fixes usually involve the EA's inputs: reduce the lot size, widen the stop distance, or use a symbol your account can trade. If the EA can't handle your broker's conditions (for example a different number of decimal places), contact its developer.
DLL imports not allowed
Some EAs call external libraries (DLLs). If the log says DLL calls aren't allowed, enable Allow DLL imports in the EA's properties — only for software from a source you trust, because DLLs run outside MetaTrader's protections.
License checks or web requests failing
EAs that verify a license online use MetaTrader's WebRequest function, which only works for addresses you allow. Go to Tools → Options → Expert Advisors, tick Allow WebRequest for listed URL, and add the address the developer gives you. Per MetaQuotes' documentation, WebRequest can't be used from indicators or inside the Strategy Tester.
Other common problems
- The EA stopped overnight — MetaTrader must stay open and connected. If your computer sleeps or restarts, the EA stops; a VPS avoids this.
- Settings lost after restart — save your inputs as a
.setfile and keep your chart layout in a profile or template. - "Not enough bars" or no signals in the tester — download more history or choose a longer test period.
- Different results live and in the tester — usually spreads, slippage and execution; see How to Run a Strategy Backtest in MT5.