An MT4 Expert Advisor is an automated trading program written in MQL4 that runs on a chart and can
open, modify, or close orders without you clicking anything. It reads live prices, evaluates the rules it was coded
with, and executes trades on your behalf. EAs run on the desktop terminal (build 1460,
March 2026) and are stored in the MQL4/Experts folder. They're powerful — and
high-risk. This guide explains what they are, how they work, where to get one, how to test it, and how to use it
without getting burned.
What is an MT4 Expert Advisor?
An EA is a program that trades on MetaTrader 4 according to coded rules. Because the same chart can run different kinds of MQL4 program, three things often get confused:
- Expert Advisor (EA) — an automated robot that places and manages trades for you.
- Custom indicator — draws or calculates only; it never trades (see installing indicators and the best MT4 indicators).
- Script — runs once on demand, performs a task, then stops.
An EA can replicate any rule-based strategy: a moving-average crossover, a breakout, a grid, a news filter, or a risk-management overlay that just trails stops on your manual trades. Whatever the logic, the EA does exactly what it's told — no more, no less. If you're new to the platform, our what is MT4 primer and how to use MT4 guide cover the basics the rest of this page assumes.
What an EA can and can't do
Before you trust one with real money, it helps to be clear-eyed about the boundary between automation and magic. An EA removes manual effort and emotion — it does not remove market risk or guarantee an outcome.
| What an EA CAN do | What an EA CANNOT do |
|---|---|
| Monitor the market 24/5 and react on every price tick | Predict the future or guarantee a profit |
| Execute a rule-based strategy without hesitation or emotion | Make a losing strategy profitable just by automating it |
| Manage stop loss, take profit, trailing stops and position size in code | Adapt to conditions it was never programmed for |
| Place and close trades far faster than a human can click | Run while MT4 is closed, offline, or AutoTrading is off |
| Backtest on historical data so you can study its behaviour | Turn a curve-fitted backtest into reliable live results |
How MT4 Expert Advisors work (MQL4)
EAs are written in MQL4, MetaTrader 4's programming language. The code runs on each new price tick for the chart it's attached to, checks its entry and exit conditions, and sends order instructions to your broker. An EA only acts while MT4 is open, connected, and the AutoTrading button in the toolbar is on — when it is, the chart corner shows a small smiley face; a sad face or a "⛔" means automated trading is disabled. Some EAs also need "Allow DLL imports" enabled in their settings if they call external libraries.
Inside the code, the EA can handle the whole trade lifecycle: deciding when to enter, sizing the position (a lot size based on your balance and risk), attaching a stop loss and take profit, trailing the stop as price moves, and closing on its exit signal. MT4 ships with around 30 built-in indicators and 9 timeframes (M1 up to MN), and an EA can read any of them to build its rules. None of that changes the core truth: the EA is only ever executing logic a human wrote.
Where people get EAs: build, buy, or free
- Build your own — full control and transparency, but you need MQL4 (or a developer). You know exactly what every rule does, which makes the risk far easier to judge.
- Buy one — paid EAs are sold on marketplaces and developer sites; vet the seller, read independent reviews, and treat flashy profit screenshots and "monthly %" claims with suspicion.
- Free EAs — widely shared on forums and download sites, but unknown code may be poorly built, curve-fitted, or outright unsafe. Never run an untrusted file live before testing it yourself.
A fourth option avoids EAs entirely: copy trading, where you mirror another trader's positions instead of running your own robot. It carries its own risks, but it doesn't require any MQL4.
Be very wary of any EA marketed as guaranteed, no-loss, or hands-off passive income, and of sellers who only show winning months or hide the strategy entirely. Those claims contradict how markets work and are a classic warning sign of a scam. No EA wins every time. See how to avoid MT4 scams for the full pattern.
How to install an EA on MT4
Installing an EA means dropping its file into the right folder and switching on automated trading. In short:
- In MT4, open File ▸ Open Data Folder, then go to
MQL4▸Experts. - Copy the EA's
.ex4(compiled) or.mq4(source) file into theMQL4/Expertsfolder. - Restart MT4 (or right-click Navigator ▸ Expert Advisors ▸ Refresh) so the EA appears.
- Drag the EA from the Navigator onto a chart, tick Allow Algo Trading (and DLL imports if required), then enable the toolbar AutoTrading button.
For the full click-by-click walkthrough with screenshots and troubleshooting, see how to install an EA on MT4.
Backtest first: the MT4 Strategy Tester
Before an EA touches real money, run it through the MT4 Strategy Tester (View ▸ Strategy Tester, or Ctrl+R). Backtesting replays historical price data through the EA so you can see how its logic would have behaved — the win rate, drawdown, profit factor, and the shape of the equity curve. It's the single most useful sanity check you have.
But a backtest is a study of the past, not a forecast. Results depend heavily on data quality, the spread and commission you model, and how much the settings were tuned to that exact history. After a clean backtest, always run the EA in real time on a demo account — a forward test — to check live behaviour, spread sensitivity, and slippage before going live with real funds. Our dedicated Strategy Tester guide covers modelling quality, optimisation, and how to read the report honestly.
Running an EA 24/5 on a VPS
An EA only trades while MT4 is open and connected, so leaving it on a laptop that sleeps, drops Wi-Fi, or reboots for updates means missed trades and unmanaged positions. A forex VPS (virtual private server) is a remote computer that runs MT4 and your EA around the clock, with a stable connection and low latency to your broker's servers — independent of whether your own machine is on. For any EA meant to run continuously, especially a latency- sensitive one, a VPS is close to essential. See our MT4 VPS guide for what to look for and how to set one up.
Not every EA needs one. A swing or end-of-day strategy that checks the market a few times a session can run fine on a home PC you leave on. But a scalper or grid EA that depends on fast fills is very sensitive to latency — the milliseconds between your terminal and the broker's server — and to any gap in uptime. For those, traders typically host on a VPS located near the broker's data centre, or use a broker-provided VPS, so the EA stays connected and quick even while their own computer is asleep. Whichever route you take, a VPS keeps the lights on; it does not make a weak strategy work.
The honest risks of EAs
Automation removes emotion and reaction time — it does not remove risk. An EA executes its rules perfectly, including when those rules are wrong for current conditions. The main dangers:
- No guarantee of profit. An EA is only as good as its strategy, and most retail traders lose money trading CFDs and forex. Automating a poor strategy just loses money faster.
- A good backtest ≠ future results. Past performance never guarantees the future; live markets bring spreads, gaps, and news the test never saw.
- Over-optimisation (curve-fitting). Settings tuned until the backtest looks perfect tend to fit historical noise and fall apart live.
- Broker conditions. Spread, slippage, and requotes can quietly turn a "profitable" backtest into a losing live account, especially for scalping or grid EAs.
- Position sizing and martingale. Aggressive sizing or doubling-down ("recovery") logic can blow an account in a single bad run.
- Scam EAs. "Guaranteed returns" robots and signal-bundled EAs are a well-known fraud vector — presented here purely as a warning.
None of this is financial advice — it's general information so you can size up the risk before you decide. Used carefully, with testing and modest sizing, an EA is a tool; treated as a money machine, it's a fast way to lose.
How to vet an EA before risking real money
There's no way to be certain an EA will work, but a disciplined checklist filters out most of the dangerous ones:
- Understand the strategy. If you can't describe in one sentence how it makes money, you can't judge its risk. Avoid black-box EAs that hide their logic.
- Backtest it yourself in the Strategy Tester with realistic spreads and good modelling quality — don't trust the seller's screenshots.
- Check the drawdown, not just the profit. A high return with a brutal drawdown is fragile. Look for out-of-sample results, not one perfectly fitted curve.
- Forward-test on demo for weeks on a demo account before any live capital touches it.
- Watch for red flags — "guaranteed", "no-loss", martingale recovery, or a seller who won't show a real, long track record.
- Go live small, with money you can afford to lose, on a regulated, EA-friendly broker, and scale only if it holds up.
An EA is only as good as its execution
An EA's results depend heavily on spreads, execution speed, and reliable fills. IC Markets offers raw-spread, scalping- and EA-friendly execution — a sensible home for automated trading.
⚠ Trading forex and CFDs is high-risk and most retail traders lose money. This is not financial advice.
Affiliate disclosure: we may earn a commission if you open a broker account through our links, at no extra cost to you. Learn more.
Next steps
Ready to set one up? See how to install an EA on MT4 and how to backtest it. Prefer not to code? Try copy trading instead. Run it 24/5 with an MT4 VPS. Choosing where to run it? Compare the best MT4 brokers for EAs.
Frequently asked questions
What is an Expert Advisor in MT4?
An Expert Advisor (EA) is an automated trading program written in MQL4 that runs on a chart inside MetaTrader 4. Attached to a chart with AutoTrading on, it can open, manage, and close orders based on its coded rules, without manual clicks.
Do MT4 Expert Advisors actually make money?
Some do, many don't. An EA only follows its rules — it carries no guarantee of profit, and most retail traders lose money. A positive backtest is not a promise of future results. Test thoroughly and only risk money you can afford to lose.
Are free MT4 EAs safe to use?
Free EAs can work, but unknown code may be poorly built, curve-fitted to past data, or unsafe. Never run an untrusted EA live without backtesting and demo forward-testing first. Treat any 'guaranteed' or 'no-loss' EA as a red flag.
Can I run an Expert Advisor on the MT4 mobile app?
No. The MT4 mobile apps for Android and iOS cannot run Expert Advisors — EAs only work on the desktop terminal. To keep an EA running continuously, traders use a Windows machine or a VPS rather than mobile.
Do I need to know MQL4 to use an EA?
Not to run one — you only need to install it and enable AutoTrading. You do need MQL4 (or a developer) to build or modify an EA. Either way, understanding what the EA's logic does helps you judge its risk before going live.
Where do I put an EA file in MT4?
Compiled (.ex4) and source (.mq4) EAs go in the MQL4/Experts folder. Open it via File ▸ Open Data Folder ▸ MQL4 ▸ Experts, drop the file in, then restart or refresh MT4 so it appears under Navigator ▸ Expert Advisors. See our full install guide for the click-by-click steps.
Why isn't my EA trading even though it's on the chart?
Check that the AutoTrading button in the toolbar is on (the chart corner should show a smiling face, not a sad one), that 'Allow Algo/Auto Trading' is ticked in the EA's settings, and that 'Allow DLL imports' is enabled if the EA needs it. The EA also only acts while MT4 is open and connected.
What is over-optimisation (curve-fitting)?
Curve-fitting is tuning an EA's settings until it looks near-perfect on past data. The result fits historical noise rather than a real edge, so it often falls apart live. A clean backtest with realistic spreads and out-of-sample testing is far more trustworthy than a too-good one.
Do I need a VPS to run an Expert Advisor?
Not to test one, but you do if you want it to trade 24/5 without leaving a PC on. A VPS keeps MT4 and the EA running with a stable connection and low latency to the broker, even when your own computer is off or offline.
Is using an Expert Advisor legal?
Yes — automated trading with EAs is allowed by mainstream regulated brokers, and many actively support it. What matters is the broker's own rules on strategies like scalping or news trading, and choosing a regulated broker. This page is general information, not financial advice.
Trading foreign exchange and contracts for difference (CFDs) carries a high level of risk and may not be suitable for all investors. Leverage can work against you as well as for you. You could lose some or all of your deposited funds; do not trade with money you cannot afford to lose. Past performance is not indicative of future results. Nothing on MT4Download.com is financial, investment, or trading advice. Consider your circumstances and seek independent advice if needed.