Many traders use automated systems to keep a strategy running throughout the trading day. The question to ask first is what the system does when a trade loses. What is a forex expert advisor? It is a MetaTrader program that can place orders automatically under predefined rules. You may also see it called a forex trading robot or forex trading bot.
In this article, Backcom.io explains how EAs work, compares four common strategies, shows how to install and backtest one on MT5, and examines costs and scam warning signs.
What Is A Forex Expert Advisor And How Is It Different From An Indicator?

A forex expert advisor (EA) is a MetaTrader program that reads market data and, when trading is permitted, places, modifies or closes orders according to its code. It follows its programmed conditions; it cannot independently predict where the market will go.
How An EA Responds To Each New Price Tick
New tick → Check conditions → Place, modify or close an order → Record the event
Each incoming tick can trigger the EA’s OnTick function. MT5 runs only one EA on a chart, so attaching another replaces the first. Disabling automated trading can leave the EA analysing prices, but prevents it from sending orders.
EA Vs Indicator Vs Script: What Changes?
The three MetaTrader program types serve different purposes:
| Criterion | EA | Indicator | Script |
|---|---|---|---|
| Main task | Analyse and trade | Analyse and display signals | Perform one task |
| Can send orders | Yes, with permission | No | Potentially |
| Running time | While the terminal is running | With the chart | Stops after its task |
| Folder | MQL5/Experts | MQL5/Indicators | MQL5/Scripts |
An MT4 EA uses MQL4 and an .ex4 file; MT5 uses MQL5 and .ex5. The files are not interchangeable. See the differences between MT4 and MT5.
4 Common Forex Trading Robot Strategies: Trend, Scalping, Grid And Martingale

A forex trading robot is defined as much by its response to losses as by its entry signal. Check both before letting one trade:
1. Trend-following EA: Uses moving averages or breakout signals to enter. It may take several small losses while waiting for longer winning trades, and can suffer losing streaks in sideways markets.
2. Scalping EA: Seeks frequent, short trades, often targeting only a few pips. Spread, commission and execution delay therefore take a larger share of each result. See scalping strategies.
3. Grid EA: Places orders at preset price intervals, such as every 20 pips. A range can let the basket close after a rebound; a sustained trend can build a large floating loss.
4. Martingale EA: Doubles the lot size after each losing trade, aiming for one winner to recover all earlier losses.
Why Grid And Martingale EAs Can Show Smooth Returns Yet Blow Up An Account
Assume EUR/USD, where one standard lot is worth $10 per pip. Start at 0.01 lot, double after each loss, and set both Stop Loss and Take Profit at 20 pips. The calculation excludes spread, commission and swap:
| Losing trade | Lot size | Cumulative lots | Loss on trade (USD) | Cumulative loss (USD) |
|---|---|---|---|---|
| 1 | 0.01 | 0.01 | 2 | 2 |
| 2 | 0.02 | 0.03 | 4 | 6 |
| 3 | 0.04 | 0.07 | 8 | 14 |
| 4 | 0.08 | 0.15 | 16 | 30 |
| 5 | 0.16 | 0.31 | 32 | 62 |
| 6 | 0.32 | 0.63 | 64 | 126 |
| 7 | 0.64 | 1.27 | 128 | 254 |
| 8 | 1.28 | 2.55 | 256 | 510 |
Seven losses cost $254. The eighth order is 1.28 lots and, even if it wins, the whole sequence nets only $2. With a $1,000 account, an assumed EUR/USD rate of 1.1000 and 1:100 leverage, that order requires about $1,408 in margin, more than the remaining balance.
If a grid holds all eight doubled positions, a 160-pip adverse move produces about $1,004 in floating loss under these assumptions. A rebound of roughly 35–40 pips can then take the basket close to breakeven, creating a deceptively smooth EA backtest.
Backcom.io does not classify every grid or martingale EA as a scam. Check the maximum number of positions, a basket-wide Stop Loss and the drawdown level that makes the EA stop. Doubling lots differs sharply from the 1% risk-per-trade rule, which sets the maximum loss before entry.
How To Install An EA On MT5 And Test It On Demo

How to install an EA on MT5 comes down to six actions. Testing what it actually does deserves more time than copying the file.
Copy .ex5 → Refresh Navigator → Attach EA to chart → Enable Algo Trading → Check Experts tab
Follow this sequence:
- Use the right file: MT5 runs .ex5. If you have .mq5 source code, open it in MetaEditor and press F7 to compile it; uncompiled source will not appear in Navigator.
- Copy it to Experts: In MT5 choose File → Open Data Folder → MQL5 → Experts, then place the EA there.
- Refresh Navigator: Right-click Expert Advisors and select Refresh, or restart MT5.
- Attach it to a chart: Open the intended symbol and timeframe, then double-click the EA or drag it onto the chart.
- Set permissions and inputs: In Common, select Allow Algo Trading. In Inputs, set lot size, Stop Loss and Take Profit to match your risk plan.
- Enable platform-wide trading: Turn on the toolbar’s Algo Trading button. When it is off, no EA can trade even if its own permission is enabled.
Allow DLL imports only when you trust the EA’s source. MetaQuotes warns that a DLL from an unknown source can put your computer and account at risk. See the MetaTrader 5 Expert Advisors guide.
Test On Demo And Diagnose An EA That Does Not Trade
Run the demo long enough to observe the EA in both quiet and volatile conditions. If it places no orders, check these possibilities in order:
- The Algo Trading button is off, or Allow Algo Trading is disabled for that EA.
- You signed in with an investor password, which gives view-only access.
- The broker does not permit automated trading on that account.
- The broker’s symbol has a different suffix from the one the EA expects, or the lot is below its minimum.
- The entry conditions have not occurred; this is not necessarily an error.
The Experts and Journal tabs in Toolbox often explain rejected or missing orders. After the demo period, traders who need continuous operation can set up MT5 and the EA on a VPS.
How To Backtest An EA On MT5 And Read The Strategy Tester Report

How to backtest an EA starts with MT5’s Strategy Tester. It runs the program on historical prices so you can inspect its entries, profit, losses and drawdown before risking real money.
Configure the test to reflect the account you expect to use:
- EA and data: Select the correct symbol, timeframe and a sufficiently long date range that includes volatile periods.
- Tick mode: Use Every tick based on real ticks when variable spreads matter. Simulated ticks use a fixed spread within each M1 bar and may understate a scalping EA’s costs when spreads widen.
- Capital and fees: Enter initial capital, leverage and commission close to those of the intended account.
- Execution delay: Try Random delay or Fixed delay. No delay represents ideal execution.
- Forward test: Reserve the newest one-third or one-quarter of the period to check parameters selected using earlier data.
If a parameter set looks strong during optimisation but deteriorates in the forward period, investigate overfitting before moving to demo.
Which EA Backtest Metrics Matter?
The Strategy Tester report shows the risk taken to produce a return:
| Metric | MetaQuotes definition | What to check |
|---|---|---|
| History Quality | Share of valid M1 data | Red segments mean quality below 50%; results are less reliable. |
| Total Net Profit | Gross Profit minus Gross Loss | Read alongside drawdown. |
| Profit Factor | Gross Profit divided by Gross Loss | Near 1 leaves little room for real costs. |
| Balance/Equity Drawdown Maximal | Largest decline from a peak to the following trough | A deeper equity decline reveals prolonged floating losses. |
| Recovery Factor | Profit divided by maximum drawdown | Compare gains with the decline endured. |
| Expected Payoff | Average result per trade | Compare with actual trading costs. |
| Total Trades | Number of closed trades | Too few trades can make a result depend on chance. |
The MetaTrader 5 Testing Report documentation defines these measures. Profit Factor uses the absolute value of Gross Loss:
Profit Factor = Gross Profit ÷ Gross Loss
For example, suppose Gross Profit is $3,000, Gross Loss is $2,000 and the EA makes 250 trades. Total Net Profit is $1,000, Profit Factor is 1.5 and Expected Payoff is $4 per trade. If real costs exceed the tester’s assumptions by $1 per trade, net profit falls to $750.
Running An EA Around The Clock: VPS, Latency And Trading Costs
An EA runs only while MT5 stays open and connected. A shutdown, lost connection or operating-system update can stop it while positions remain open. A VPS can keep the terminal running when your own computer is off.
When Does A Forex Trading Robot Need A VPS?
Scalping robots and EAs that manage open positions continuously are more sensitive to outages and latency than trend EAs on H4 or D1 charts. Measure latency to the broker’s trading server, not to your home computer.
MetaQuotes advertises 0–5 ms latency for MQL5 VPS and access to 96% of broker servers in under 10 ms. As at 14 October 2026, its listed price runs from $15 per month on a one-month plan to $10 per month with a 12-month commitment. The 24-hour trial switches automatically to a paid plan, and EAs requiring DLLs cannot run on this service.
Third-party Windows VPS plans commonly cost around $10–$30 per month, depending on specifications.
How Trading Costs Change A Scalping EA’s Result
For a forex trading bot placing many small trades, convert every cost into cash. Assume 200 trades a month, each for 0.1 lot of EUR/USD. One pip on one standard lot is worth $10, and commission is charged round-trip:
| Illustrative account type | Spread | Commission (USD/lot) | Cost per 0.1-lot trade | Cost for 200 trades/month |
|---|---|---|---|---|
| Standard-style account | 1.0 pip | 0 | $1.00 | $200 |
| Raw/ECN-style account | 0.1 pip | 7 | $0.80 | $160 |
| Zero-style account | 0.0 pip | 7 | $0.70 | $140 |
These are hypothetical figures as at 14 October 2026. They do not describe or rank any particular broker.
An assumed 0.3 pip of slippage per trade adds $60 a month. Knowing how to convert a forex spread into USD is therefore more useful than comparing pip figures alone.
With cost expressed in the same pip units as Take Profit and Stop Loss, the required breakeven win rate is:
Breakeven win rate = (Stop Loss + Cost per trade) ÷ (Take Profit + Stop Loss)
For an illustrative 5-pip Take Profit, 5-pip Stop Loss and 1-pip cost, the EA must win 60% of trades to break even, rather than 50% before costs.
Should You Use A Forex Trading Bot? EA Scam Warning Signs
A forex trading bot can enforce a trading plan, but it cannot guarantee a profit. Not every EA is fraudulent; screenshots of gains alone are equally insufficient proof of reliability.
Check these six warning signs before paying for software or funding an account:
- Fixed returns or a 100% win-rate claim: The CFTC warned on 25 January 2024 about bots advertised with 100% wins. France’s AMF documented promises of 5–15% monthly returns.
- Only balance screenshots or demo-account evidence: In the Mirror Trading International case described in the CFTC trading-bot advisory, operators used MetaTrader demo accounts to show fake balances. The case involved more than $1.7 billion and at least 23,000 people.
- Pressure to use a designated “partner” broker: Check the signs of a forex broker scam before depositing.
- A licence sale with multi-level recruitment commissions: Vietnam’s Ministry of Industry and Trade warned in July 2021 about an unlicensed multi-level model involving rented “AI Robots.” This warning is especially relevant for traders based in Vietnam.
- No testing access and a demand to enable an unfamiliar DLL: MQL5 Market EA demos can run in Strategy Tester. An unknown DLL adds a computer-security risk.
- Extra payments demanded before withdrawal: A Hanoi police warning reported by VTV (in Vietnamese) describes demands for “withdrawal fees,” “tax” or “verification fees” in forex investment scams.
Before committing real money, request a real-account history that can be independently verified. Then run your own test with a small amount of capital.
Frequently Asked Questions (FAQ) About Forex Expert Advisors
Must My Computer Stay On 24/7 To Run An EA?
Yes, if it runs on your computer, MT5 must remain open and connected. A VPS can keep the forex trading bot operating while your home computer is off. Before renting one, check the trial’s length and whether it renews automatically. An always-on terminal does not remove the need to monitor positions and errors.
Do I Need To Know How To Code To Use An EA?
No. You can run an existing .ex5 file without writing MQL5. But before granting trading permission, understand when the EA enters, what it does after a loss and what each Input setting controls. Otherwise, you may have no reliable way to judge its risk or spot behaviour that differs from the seller’s description.
Can An MT4 EA Run On MT5?
No. MT4’s .ex4 file is built from MQL4; MT5 runs .ex5 files built from MQL5. Simply changing the file extension does not convert the program. Ask the developer for an MT5 version or have the code rewritten. Once you have .ex5, follow the installation steps above and test it on demo.
Is A Strong EA Backtest Enough To Trust It?
No. Parameters may be overfitted to historical prices, tick data may be unsuitable, or slippage and fees may be understated. Compare the EA backtest with a forward test, watch it on demo and then use a small live allocation. The reported profit matters only alongside the drawdown and the conditions used to generate it.
Conclusion
Knowing what a forex expert advisor is is only the start. Examine both entry rules and loss handling, compare backtest and forward results, and account for spread, commission and VPS costs. Install the right file, test on demo, read drawdown, start with small capital and avoid any robot promising profits.
If your EA trades many lots, the forex broker rebate comparison can help you assess costs. Backcom.io is an independent introducing partner (IB/affiliate) of the brokers it lists, and rebates are paid out of the commission each broker pays its partner; see the risk disclaimer.
Disclaimer: Backcom.io compiled this article for information only. It is neither investment advice nor a trading recommendation. An EA can lose money, including your entire capital. All numerical examples are hypothetical.























