MAT MasterclassPart of MAT+ Sign in Start free

Guides

How to Use Expert Advisors (EAs) on MT4

Automate your trading strategies with Expert Advisors on MetaTrader 4.

What Are Expert Advisors?

Expert Advisors (EAs) are automated trading programs that run inside MetaTrader 4. They execute trades based on pre-programmed rules — from simple moving average crossovers to complex multi-indicator strategies. Once attached to a chart, an EA monitors the market 24 hours a day and places trades when its conditions are met, removing the emotional element from trading.

EAs are written in MQL4, the programming language built into MetaTrader 4. You do not need to write code yourself — there are thousands of ready-made EAs available, and many offer free versions or trial periods.

Finding Expert Advisors

There are several reputable sources for EAs:

MQL5 Market — The official store, reachable from the Market tab inside MetaTrader 4 and 5. Each product page shows the seller's description, screenshots and user reviews, and most EAs have a free demo version you can run in the Strategy Tester before you buy. Screenshots and seller backtests are claims, not verified results — test the demo yourself.

Copy trading instead of an EA — RoboForex has no EA store. Its copy trading service (CopyFX) lets you follow another trader's account instead of running a robot yourself. The same rule applies: judge the full history, not the best month.

Independent Developers — Forums like MQL4.com and Forex Factory host communities where developers share and sell EAs. Exercise caution here — always verify claims with your own backtesting.

⚠️ Warning

Be skeptical of any EA that promises guaranteed profits or shows only winning trades. Legitimate EAs have losing periods, and their developers are transparent about drawdowns and limitations.

🧒Expert Advisors in Plain English

Think of an EA like a recipe programmed into a smart oven. You tell it: "When the dough reaches this temperature, bake for exactly 20 minutes, then cool for 5." The oven follows the recipe perfectly every time — no forgetting, no guessing, no getting distracted by your phone. An EA does the same thing for trading: you define the rules (when to buy, when to sell, how much to risk), and it executes them 24 hours a day without fatigue, fear, or greed. The catch? The recipe has to be good. A bad recipe perfectly executed still produces bad results.

Installing an EA on RoboForex MT4

Step 1: Download the EA File

After purchasing or downloading an EA, you will have a file with an .ex4 extension (compiled) or .mq4 (source code).

Step 2: Open the Data Folder

In MetaTrader 4, go to File → Open Data Folder. Navigate to MQL4 → Experts and paste your EA file into this directory.

Step 3: Refresh the Navigator

Back in MT4, open the Navigator panel (Ctrl+N). Right-click on Expert Advisors and select Refresh. Your new EA should appear in the list.

Step 4: Attach the EA to a Chart

Open a chart for the instrument you want to trade. Drag the EA from the Navigator panel onto the chart. A settings dialog will appear.

Step 5: Configure Settings

In the settings dialog:

  • Go to the Common tab and check Allow Algo Trading
  • Switch to the Inputs tab to configure the EA's parameters (lot size, stop loss, take profit, indicator periods, etc.)
  • Click OK to activate

Step 6: Enable Auto Trading

Click the Algo Trading button in the MT4 toolbar (it should turn green). This is the master switch — EAs will not trade unless this is enabled.

Backtesting Before Going Live

Never deploy an EA on a live account without thorough backtesting. MetaTrader 4 includes a powerful Strategy Tester:

  1. Open the Strategy Tester (Ctrl+R)
  2. Select your EA from the dropdown menu
  3. Choose the symbol, timeframe, and date range (use at least 2–3 years of data)
  4. Select Every tick based on real ticks for the most accurate simulation
  5. Set your initial deposit and leverage to match your real account conditions
  6. Click Start and review the results

Pay close attention to these metrics in the backtest report:

  • Profit Factor — A common screen is above 1.5; below 1.0 loses money. It only means something over enough trades
  • Maximum Drawdown — Should be within your risk tolerance (under 20–30%)
  • Total Trades — 100 is the floor, not proof. Whether a result is more than luck depends on how far it sits above break-even: at 100 trades a win rate is still only known to about ±10 points
  • Recovery Factor — Net profit divided by max drawdown; higher is better

After backtesting, run the EA on a demo account for at least 2–4 weeks to check that it trades the same live (spreads, slippage, fills). A few weeks is an execution check - far too few trades to confirm or disprove the edge.

📝Evaluate an EA Backtest ReportHands-On
You just backtested an EA on EUR/USD over 2 years with the following results: 847 total trades, profit factor 1.82, maximum drawdown 24%, win rate 58%, net profit $12,340 on a $10,000 starting balance.
Your Tasks:
1Determine whether 847 trades at this win rate and profit factor is more than luck: find the break-even win rate and how far 58% sits above it
2Evaluate whether the profit factor of 1.82 passes the common 1.5 screen
3Assess whether the 24% maximum drawdown is within acceptable limits
4Calculate the recovery factor (net profit ÷ max drawdown) and evaluate it
Profit factor = (win rate × average win) ÷ (loss rate × average loss), so average win ÷ average loss = 1.82 × 0.42 ÷ 0.58. Break-even win rate = 1 ÷ (1 + average win ÷ average loss). Standard error of a win rate = sqrt(p × (1 − p) ÷ n). Drawdown under 30% is acceptable. Recovery factor above 3 is considered strong.
Average win ÷ average loss = 1.82 × 0.42 ÷ 0.58 = 1.32, so the break-even win rate is 1 ÷ 2.32 = 43.1%. The standard error of a 58% win rate over 847 trades is the square root of (0.58 × 0.42 ÷ 847): 1.7 points, so 58% sits about 8.8 standard errors above break-even — chance does not explain this result. Over-fitting still can: a backtest shows the rules fit the past, not that they will keep working. The profit factor of 1.82 passes the 1.5 screen — an edge worth testing further (a backtest is not proof). The 24% drawdown is within the acceptable range (under 30%), though you should be prepared for periods of significant underwater time. Recovery factor = $12,340 ÷ $2,400 = 5.14 (taking the 24% drawdown as $2,400 of the $10,000 start - use the dollar figure the report prints) — this is strong, meaning the EA recovers well from drawdowns. Overall verdict: this EA is worth a 2-4 week demo run to check it executes the same live, then small live size while the live record builds.

VPS Hosting for 24/7 Operation

EAs need MetaTrader 4 running continuously to function. If your computer shuts down or loses internet, the EA stops trading — potentially leaving positions unmanaged.

RoboForex offers its own VPS: 1 CPU core, 1 GB RAM, 30 GB disk, Windows Server 2019. By RoboForex's terms it is free while your trading account holds more than $300 (bonuses excluded) and you trade at least 3 standard lots in the calendar month — volume in CFDs, including US-stock and crypto CFDs, does not count. Otherwise it costs $5 a month. It is a small server: fine for one terminal with a light EA, tight for several.

To activate it:

  1. Verify your RoboForex account and keep more than $300 in the trading account
  2. In the Members Area, open Your VPS server 2.0 and submit the request
  3. Connect with Remote Desktop, install MT4 on the VPS and set up your EA there

Risk Management with EAs

Automation does not eliminate risk — it amplifies your strategy, both the good and the bad. Follow these principles:

  • Start with minimum lot sizes and scale up only after confirming live performance matches backtests
  • Set a maximum daily loss limit in the EA settings or through your broker's risk controls
  • Monitor weekly even if the EA is fully automated — market conditions change, and an EA optimized for trending markets may struggle in ranging conditions
  • Keep your EA updated — markets evolve, and periodically re-optimizing parameters keeps performance aligned with current conditions
  • Never run multiple EAs on the same account without understanding how they interact — conflicting positions can multiply risk unexpectedly
🎯
Trading Scenario
The EA That Stopped Working
You have been running an EA on your RoboForex live account for 3 months. For the first 2 months, it performed beautifully — steady gains with a maximum drawdown of 12%. In month 3, the EA has lost 8% of your account in 2 weeks. The market has shifted from strong trends to a choppy, range-bound environment. Your EA is a trend-following system. What do you do?
What would you do?
✅Good Thinking!

Recognizing that a trend-following EA struggles in ranging markets shows good understanding. However, knowing when the market will trend again is difficult — you could miss the re-entry. A better approach might be to reduce the EA's lot size rather than turning it off entirely, so it stays active with minimal risk when the trend returns.

⚠️Risky Move

Drawdowns are indeed normal, but blindly ignoring a clear market regime change is dangerous. The EA was optimized for trending conditions. Running it unchanged in a ranging market is like wearing a winter coat in summer — the tool is good, but the conditions have changed. At minimum, reduce your lot size until conditions improve.

🏆Excellent Choice!

The ideal response. You do not abandon a proven system based on one bad stretch, but you do adapt your risk to the current environment. Reducing lot size preserves capital during unfavorable conditions while keeping the EA active so it can capture the next trend when it begins. Monitoring daily instead of weekly gives you faster response time if conditions deteriorate further.

❌Dangerous

Chasing performance by switching EAs after every drawdown is the automated equivalent of strategy-hopping. No EA works in all market conditions. The professional approach is to understand your EA's strengths and weaknesses, then adjust your risk management accordingly. If you want ranging market coverage, consider adding a second EA on a separate account — never replace a proven system after one bad month.

🎯 Knowledge Check
You've backtested an EA and it shows a profit factor of 1.2 over 50 trades. What should you do?
AIncrease the lot size to compensate for the low profit factor
BRun more backtesting with a larger sample size and longer time period
CDeploy it on a live account immediately — it's profitable
DDiscard the EA entirely — 1.2 is too low to be useful
📝Key Takeaways
1EAs remove emotion from trading but require careful selection, thorough backtesting, and ongoing monitoring
2Always backtest with at least 2-3 years of data and look for profit factor above 1.5, drawdown under 30%, and 100+ trades
3Run every EA on a demo account for 2-4 weeks before going live to check it executes the same — backtests and live performance can differ, and a few weeks cannot prove the edge
4An EA only trades while its terminal runs, so a VPS matters for 24/5 operation — RoboForex's own VPS is free above $300 and 3 standard lots a month, $5 a month otherwise
5Start with minimum lot sizes on live and scale up only after confirming live performance matches backtests
6The Masterclass Chart Coach EA sends your MT4 trades to your learning journal — it never places a trade

Run Your EAs on RoboForex

RoboForex allows Expert Advisors on MT4 and MT5 and offers the VPS described above. Whatever broker you pick, compare the costs your EA will actually pay: RoboForex publishes the minimum and average spread and the commission of every symbol, per account type, in its contract specifications.

We use RoboForex ourselves and are its introducing partner (partner code KXTL): if you open an account through our link, RoboForex pays us a partner commission. RoboForex's own risk warning (September 2026): 75.85% of retail investor accounts lose money trading CFDs with this provider.

Open Your RoboForex Account →

Already trading? Register for the free Trading Masterclass → to get our exclusive EA, AI trade review, trading simulator, and 48 structured lessons — all free with your KXTL account.