MT5 EA Tutorial: Install, Configure, and Run an Expert Advisor

Quick Answer

An MT5 EA tutorial walks you through five stages: download the Expert Advisor file, copy it into your MetaTrader 5 Experts folder, restart the terminal, enable Algo Trading, and drag the EA onto the correct chart and timeframe with the right lot-sizing and risk settings. Before you commit real capital, run the EA through the Strategy Tester, forward-test it on a demo account, and confirm its track record on an independent verification service. The whole setup usually takes under 30 minutes, but the risk-configuration step is where most beginners get it wrong, so it deserves the most attention.

If you have never installed an automated trading robot before, MetaTrader 5's Expert Advisor system can look intimidating the first time you open the Navigator panel and see a wall of unfamiliar folders. It isn't complicated once you know the sequence, but skipping a step - forgetting to enable algorithmic trading, dropping the file in the wrong folder, or attaching the EA to the wrong timeframe - is exactly how a promising strategy turns into a frustrating first week. This tutorial covers the full installation and configuration workflow end to end, then goes deeper into the parts most guides skip: reading the input settings correctly, sizing risk properly, verifying that an EA's results are real, and avoiding the mistakes that cost new EA users money in their first month.

What an MT5 Expert Advisor Actually Does

An Expert Advisor (EA) is a program written for the MetaTrader 5 platform that executes a defined set of trading rules automatically. Instead of watching charts and clicking buy or sell, the EA monitors price, applies its logic, and places, manages, and closes orders on your behalf according to the parameters you set. MetaTrader 5 supports this natively through its automated trading framework, which lets EAs written in MQL5 interact directly with your broker's execution engine.

Not every EA works the same way. Some are pure scalpers firing dozens of trades a day; others are highly selective, looking for only a handful of qualifying setups per week. Some rely on martingale or grid recovery (adding to losing positions to average down), which can produce a smooth equity curve for months before a single bad run wipes out the account. Others use fixed, rules-based entries with a defined stop and no averaging at all. Golden Viper EA, for example, is a selective XAUUSD-only system trading the H4 timeframe, typically identifying at most one qualifying setup per day, using risk-based lot sizing with no martingale, grid, or position-averaging logic. Understanding which category an EA falls into matters more than the installation steps themselves - see this guide to understanding EA settings for more.

MT4 vs. MT5: Does the Platform Matter?

Both MetaTrader 4 and MetaTrader 5 run Expert Advisors, but the underlying languages (MQL4 and MQL5) differ, and an EA compiled for one platform won't run on the other without a separate build. When shopping for an EA, check whether the license covers both platforms or just one - some vendors charge separately for MT4 and MT5, while others, including Golden Viper EA, bundle a single lifetime license across both. The MetaTrader 4 help documentation and MetaTrader 5 terminal help cover platform-specific setup details beyond what's here.

What You Need Before You Start

Before installing any EA, confirm you have the following in place - skipping one of these is the most common reason a first install fails or behaves unexpectedly.

  • A MetaTrader 5 terminal installed and logged into a live or demo account with a broker that permits automated trading.
  • The EA file itself, typically a compiled .ex5 file (and sometimes a .set file with pre-configured inputs).
  • Administrator rights on your computer, since MT5's data folder sometimes requires elevated permissions to write to on first install.
  • A clear understanding of the symbol and timeframe the EA is designed for - attaching a gold-specific EA to a EUR/USD chart, or to the wrong timeframe, is a frequent setup error.
  • A defined risk plan: how much of your account you're willing to risk per trade and per month, decided before the EA places a single order.

If you're also setting up a VPS to keep the EA running continuously, it's worth handling that in parallel - see this VPS setup walkthrough before you go live, since an EA that stops running when your laptop sleeps can miss trade management just as easily as it misses entries.

Step-by-Step: Installing an EA on MetaTrader 5

The installation is mechanical once you know where MT5 stores its files.

1. Open the Data Folder

In MT5, click File in the top menu, then select Open Data Folder. This opens a Windows Explorer window pointed at your terminal's private data directory, which is separate from the main program installation folder.

2. Locate the Experts Folder

Inside the data folder, navigate to MQL5 > Experts. This is where every EA file must live for MetaTrader to detect it. Copy your .ex5 file into this folder. If your EA came with a .set file containing preset input values, you can place that anywhere convenient on your computer - you'll import it manually later during attachment.

3. Restart MetaTrader 5

Close the terminal completely and reopen it. MT5 only scans the Experts folder for new files on startup, so a fresh install won't appear in the Navigator panel until you restart. This trips up more new users than any other step - if your EA isn't showing up, this is almost always the fix.

4. Confirm the EA Appears in the Navigator

Open the Navigator panel (Ctrl+N if it isn't visible) and expand Expert Advisors. Your EA should now be listed by name. If it isn't, double-check it landed in the correct Experts subfolder and that the file extension is .ex5, not .mq5 (the latter is uncompiled source code, not an installable program).

5. Enable Algo Trading

Click the Algo Trading button in the main toolbar so it turns green. This global switch must be on for any EA to place trades - if it's off (gray or red), every EA on every chart will sit idle regardless of its internal logic. This is the single most common reason a correctly installed EA "does nothing," and it's worth checking first any time an EA seems unresponsive.

Step-by-Step: Attaching and Configuring the EA on a Chart

Installation puts the EA on your system; attachment turns it on for a specific instrument.

1. Open the Correct Symbol and Timeframe

Open a chart for the exact instrument the EA is designed to trade, on the exact timeframe specified in its documentation. A gold-focused EA built for the H4 chart won't behave as intended on an M15 EUR/USD chart - the logic reads price action from the timeframe it's attached to, so this one mismatch can silently break an otherwise sound strategy.

2. Drag the EA Onto the Chart

From the Navigator panel, drag the EA's icon onto the open chart. A configuration window opens with several tabs: General, Inputs, and (depending on your build) Dependencies and Permissions.

3. Review the Inputs Tab

This is where the EA's adjustable parameters live - typically things like risk mode, lot-sizing method, maximum trades, and any optional filters. If you have a .set file, click Load at the bottom of the Inputs tab and select it to auto-populate the recommended values instead of entering them by hand.

4. Check the Common Tab (Permissions)

Confirm "Allow live trading" is checked. You may also see options for allowing DLL imports or web requests - only enable these if the EA's documentation specifically requires them.

5. Click OK and Confirm the Smiley Face

Once attached correctly, a small icon in the top-right corner of the chart turns into a green smiley face, indicating the EA is active and Algo Trading is enabled. A gray or frowning icon means something is off - usually Algo Trading being disabled, or the broker blocking automated trading on that account type.

Setup StepWhere to Do ItWhat to Verify
Copy EA fileMQL5 > Experts folderFile extension is .ex5, not .mq5
Restart terminalClose and reopen MT5EA now visible in Navigator panel
Enable Algo TradingMain toolbarButton is green, not red or gray
Attach to chartCorrect symbol and timeframeMatches the EA's documented requirements
Load inputsInputs tab of the EA window.set file loaded or values manually confirmed
Allow live tradingCommon/Permissions tabCheckbox is checked
Confirm status iconTop-right corner of chartGreen smiley face, not a gray or red icon

Backtesting and Forward Testing Before You Go Live

Attaching an EA to a live chart without testing it first is one of the fastest ways to lose confidence in a strategy that might actually be sound - or to gain false confidence in one that isn't. MetaTrader 5's built-in Strategy Tester (Ctrl+R) lets you run an EA against historical price data to see how it would have performed, using different modeling qualities and date ranges. The MQL5 documentation covers the Strategy Tester's technical settings if you want to go deeper into tick modeling and optimization passes.

A full walkthrough of running and interpreting a backtest is covered in this MT5 backtesting guide, but the short version is: test across at least 12-18 months covering different market conditions (trending, ranging, high-volatility news periods), watch maximum drawdown and not just net profit, and then forward-test on a demo account for several weeks before risking real capital. A backtest that looks perfect but disappoints in live demo trading is usually a sign of overfitting - parameters tuned too tightly to historical data rather than a robust rule set.

Worked Example: Reading a Backtest Report

Say a backtest over 500 trades shows a net profit of $4,800 on a $10,000 starting balance, a maximum drawdown of 14%, and a profit factor of 1.6 (gross profit divided by gross loss). On the surface that's a 48% return. But the 14% drawdown means that at some point during the test, the account fell to roughly $8,600 before recovering - a real trader would have needed the discipline to stay in the system through that stretch. Drawdown is arguably the more important number to internalize before going live, because it tells you what you'll actually experience emotionally, not just what you'll earn on paper. For more on this specific metric, see this breakdown of drawdown before deciding whether a strategy's risk profile actually fits your account.

Input ParameterWhat It ControlsTypical Beginner Mistake
Risk mode / risk percentHow much account equity is risked per tradeSetting an aggressive mode on a small account
Lot sizing methodFixed lots vs. risk-based dynamic sizingUsing fixed lots that don't scale with account size
Magic numberIdentifies which trades belong to which EARunning two EAs with the same magic number on one account
Max spread filterWhether the EA holds off during wide-spread conditionsLeaving it at a default not suited to the broker's typical spread
Trading session hoursWhich market hours the EA is allowed to tradeRunning it outside the EA's intended liquidity window

If you plan to run more than one EA on the same account, make sure each uses a distinct magic number so their trades don't get mixed up in your trade management logic - this is explained in detail in this guide to EA magic numbers.

Risk Management Settings You Cannot Skip

Every EA tutorial that stops at "attach it and click OK" is incomplete. The inputs tab typically includes risk controls, and how you set them determines whether the EA's strategy and your account's survival stay aligned.

Worked Example: Risk-Based Lot Sizing

Suppose you're running an EA in a "Normal" risk mode that risks 2% of account equity per trade. On a $5,000 account, that's $100 of risk per position. If the stop distance on a given XAUUSD setup works out to 400 points, worth roughly $1 per 0.01 lot (actual point value depends on your broker's contract specs), the EA sizes the position near 0.025 lots to keep dollar risk close to that $100 ceiling. Compare a fixed-lot approach using 0.10 lots regardless of account size: on the same account, a 400-point stop at 0.10 lots risks $400, or 8% of the account on one trade. That difference - 2% versus 8% - is the difference between an account that can absorb a losing streak and one that can't. This is why Golden Viper EA offers three risk modes (Conservative, Normal, and Aggressive) rather than one fixed setting, scaling position size to both your account balance and risk tolerance. See Investopedia's overview of risk management for a broader framework.

Setting a Realistic Per-Trade and Per-Month Ceiling

Decide in advance what percentage of your account you're comfortable risking per trade (commonly 1-2% for conservative setups) and what drawdown level would trigger you to stop and reassess (many practitioners use 15-20% as a review threshold). Write both numbers down. An EA can execute a rule-based strategy with more discipline than a human, but it can't decide for you that today's conditions warrant sitting out - that's still your call, starting with the risk settings you choose at attachment.

Running Your EA 24/5: VPS vs. a Home Computer

An Expert Advisor only trades while the MetaTrader terminal it's attached to is running and connected to your broker. Close the terminal, put your laptop to sleep, or lose your internet connection, and the EA stops monitoring the market entirely. For an EA on a timeframe like H4, a few hours of downtime can mean missing an entire setup.

FactorHome ComputerVPS (Virtual Private Server)
UptimeDepends on your power, internet, and sleep settingsRuns continuously, typically 99%+ uptime
Latency to brokerVariable, depends on ISP and distanceCan be hosted near broker servers for lower latency
CostNone beyond existing hardwareMonthly hosting fee
ConvenienceRequires manual monitoring for outagesAccessible remotely from any device
Best suited forTesting and short demo runsLive automated trading on any timeframe

For anyone running an EA beyond the demo-testing stage, a VPS is generally worth the modest monthly cost, particularly if you travel, have unreliable home internet, or simply don't want your trading dependent on your laptop staying powered on. This comparison of VPS options for EA trading covers provider selection in more depth.

Verifying an EA's Real Performance Before You Trust It

Anyone can post a screenshot of a trading account showing impressive returns. What separates a credible EA from an unverifiable claim is independent, third-party verification that can't be edited after the fact. Myfxbook is the most widely used platform for this in the retail forex and gold-trading space - it connects directly to a live account via investor password and publishes an unalterable trade history, plus drawdown and profit factor calculated automatically rather than self-reported. Its own verification process documentation explains exactly what "verified" means and what it doesn't guarantee.

A second layer worth checking is MQL5 Signals, which publishes an EA's live trading as a subscribable signal directly from the broker account, with the same trade-by-trade transparency. Golden Viper EA publishes both: a verified live track record on Myfxbook (account 11943038) and an MQL5 signal, so its performance can be checked independently rather than taken on faith. When evaluating any EA, insist on a verified account link before trusting marketing copy - "verified" and "unverified" claims are fundamentally different categories of evidence.

Common Setup Mistakes and Red Flags to Watch For

Most EA problems trace back to a handful of repeatable mistakes, not to the EA itself.

Setup Mistakes

  • Algo Trading left off. Covered above, but worth repeating - it's the number one cause of "the EA isn't trading" support requests.
  • Wrong symbol or timeframe. An EA designed for XAUUSD on H4 will not behave the same way, or may not trade at all, if attached elsewhere.
  • Ignoring the risk mode setting. Defaulting to an aggressive mode without understanding the drawdown implications for your account size.
  • Running multiple EAs with conflicting magic numbers or overlapping strategies on the same account without understanding how they interact with each other's trade management.
  • Never testing on demo first. Going straight to a live account skips the step that would have caught a configuration error before it cost money.

If your EA is installed correctly but still behaving unexpectedly - not trading, trading at the wrong times, or throwing errors in the terminal's Experts tab - this troubleshooting guide for common EA problems walks through the standard diagnostic steps.

Red Flags in the EA Marketplace

Beyond setup mistakes, stay alert to the broader pattern of scams in the automated-trading space. The CFTC's guidance on forex fraud and its advisory on fraudulent trading systems both warn about products marketed with guaranteed returns, "no-risk" language, or performance claims that can't be independently checked. The FTC's overview of investment scams covers similar red flags. No legitimate EA can promise guaranteed profits or eliminate risk - any vendor claiming otherwise deserves skepticism regardless of how polished the marketing looks. Before buying any EA, check for a verifiable track record (not just screenshots), honest language about risk, and support channels you can actually reach.

Choosing the Right EA for Your Account

Once your MT5 environment is set up correctly, the remaining variable is choosing an EA suited to your goals rather than the flashiest marketing page: a rules-based strategy with a clear approach, a verifiable track record over screenshots, and a risk model that scales sensibly with your account size. You can review Golden Viper EA's own licensing terms and verified track record at the Golden Viper EA homepage.

Risk Disclosure

Trading foreign exchange and commodities such as gold carries a substantial risk of loss and is not suitable for every investor. Past performance, whether from a backtest or a live verified track record, does not guarantee future results. Losses are possible, including the loss of your full trading capital, and you should only trade with money you can genuinely afford to lose. This article is educational in nature and does not constitute personalized financial or investment advice.

Frequently Asked Questions

Do I need to know how to code to use an MT5 EA?

No. Installing and running a pre-built, compiled EA (a .ex5 file) requires no programming knowledge - you're working with the Inputs tab and toolbar buttons, not writing code. Coding knowledge only becomes relevant if you want to build or modify an EA's underlying strategy yourself.

Why isn't my EA placing any trades after installation?

The most common cause is that Algo Trading is disabled in the main toolbar. Other frequent causes include being attached to the wrong symbol or timeframe, the broker restricting automated trading on that account type, or the EA's entry conditions simply not having been met yet - a selective EA that trades once a day won't fire the moment you attach it.

What's the difference between backtesting and forward testing?

Backtesting runs the EA against historical price data to estimate how it would have performed in the past, using MT5's Strategy Tester. Forward testing runs the EA in real time on a demo account, so you can see how it behaves under live market conditions and current spreads without risking capital. Both steps matter - a strong backtest with no forward-testing confirmation is an incomplete picture.

Is it safe to leave an EA running unattended?

A properly configured EA with sound risk settings is designed to operate without constant supervision, but "unattended" shouldn't mean "unchecked." Review your account periodically, watch for unusual behavior after broker or platform updates, and make sure you understand what the EA's risk mode is doing before letting it run for extended stretches, especially on a VPS.

Why does my EA behave differently in backtesting than live trading?

Differences usually come from spread, slippage, and execution speed - a backtest often models these imperfectly compared to real market conditions, especially around high-volatility news events. This is one reason forward testing on a demo account, under real live-market conditions, is a necessary step before going live with real capital.

Does Golden Viper EA work on both MT4 and MT5?

Yes. A single Golden Viper EA lifetime license covers both the MT4 and MT5 versions, so you're not required to purchase separate licenses if you decide to switch platforms or run both.

How much does Golden Viper EA cost?

Golden Viper EA is available as a one-time $199 lifetime license covering both MT4 and MT5, with no subscription and no recurring fees. For traders who prefer a copy-trading approach instead of installing the EA themselves, it's also available as an MQL5 copy signal for $30 per month.

What timeframe and instrument does Golden Viper EA trade?

Golden Viper EA trades exclusively XAUUSD (gold) on the H4 timeframe. It is intentionally selective, generally identifying at most one qualifying setup per day rather than trading continuously.

Can I verify an EA's results before buying it?

Yes, and you should insist on it. Look for a live account published on Myfxbook or as an MQL5 signal, both of which display an unalterable, trade-by-trade history rather than a self-reported summary. Golden Viper EA publishes both a verified Myfxbook track record and an MQL5 signal for exactly this reason - so its performance can be checked independently before you commit.

Myfxbook Verified

Automate Your Tutorials Edge

+€1,485Net · 6-mo (verified)
56%Win Rate (51/91)
24/5Automated
Starting at $199 one-time
Get Lifetime Access →
✓ Instant download✓ Full feature access✓ MT4 & MT5 compatible
AW

Adrian Walsh

Adrian Walsh writes about MetaTrader 4/5, Expert Advisors, and automated XAUUSD gold trading for Golden Viper EA.

Myfxbook VerifiedLive since Jan 2026Public track record

Let Golden Viper EA trade gold for you

Automated XAUUSD trading for MT4 & MT5, verified live on Myfxbook. One-time $199, lifetime access.

Get Lifetime Access — $199