In this article
After this article, you can
- Distinguish total symbol volume from volume assigned to an EA.
- Write an explicit position-identification rule in an EA specification.
Terms at hand: Hedging · Lot (position unit) · Trading Plan · Commission · Demo account · Drawdown
A hypothetical advertisement promises a 95% win rate and profit while the user sleeps. That claim does not establish expected return, drawdown or reliability. Evaluate the actual rules, test provenance, costs and risk controls rather than assuming either success or a predetermined month-long loss path.
What exactly is an Expert Advisor?
An Expert Advisor is a trading program for MetaTrader: MQL4 in MT4 or MQL5 in MT5. Its behaviour depends on its implementation and permissions. Some use simple rules, while MQL5 can also run ONNX machine-learning models. The label EA therefore does not establish the presence or absence of artificial intelligence, profitability or adaptability.
The local EA runs in its attached terminal; closing that copy stops its logic. Its code can handle ticks, timers or other events, and sending a trade request also requires suitable permissions, connection and server acceptance. Accepted orders may remain after shutdown under their own conditions: see SL, TP and EAs after terminal closure. A separately running remote copy can continue, but a VPS needs process, network and journal checks. Stopping code is not automatically a command to cancel pending orders or close positions.
What automation changes in a trading process
On the benefit side
- It can apply explicit rules repeatedly without a user making each decision. Correctness still depends on implementation, permissions, data and how rejected or partial operations are handled.
- It watches the market during the hours in which its host and connection remain active, including times when its user is not monitoring.
- Historical simulation can expose rule and implementation errors before use. The chosen dataset, costs and execution model determine what the test actually checks.
- Routine actions can be automated, but monitoring, dependency updates, restarts and unexpected behaviour still require a defined procedure. No fixed small daily workload is established here.
On the risk side
- A sales chart may omit costs, selection history or live results. Check the provenance and limitations of the specific evidence presented; no verified prevalence statistic about all internet robots is established here.
- A program reacts to market conditions only as its implementation allows. A fixed trend rule can continue firing in a range, while another EA may include explicit regime filters or adaptive components. Inspect the code and specification instead of assuming every EA ignores change.
- Results can depend on spread, slippage, specification and execution timing. The same programme need not produce an identical result across accounts, but different broker names alone do not prove a measured difference.
- A purchased programme may expose useful rules or diagnostics, but a sales curve alone does not explain its risks. Require enough information to interpret behaviour and decide when to stop or investigate it.
Why can a robot’s results disappoint?
First check the payoff, not only the winning percentage. In a hypothetical 100 closed trades, 95 wins of USD 10 total USD 950. Five losses of USD 100 leave USD 450 before costs; five losses of USD 250 instead leave USD −300. Assuming a separate USD 2 cost per completed trade reduces those results to USD 250 and USD −500. These are arithmetic samples, not success statistics or forecasts for an EA.
Then inspect open exposure. In a separate cost-free account model, initial USD 10,000 plus the USD −300 closed result gives balance USD 9,700; floating P/L of USD −1,200 leaves equity USD 8,500. Closed-trade wins do not show the whole account. Doubling successive model sizes 1, 2, 4, 8, 16 and 32 totals 63 units across the sequence. If earlier positions remain open, inspect aggregate exposure; if they were closed, that sum is cumulative trading size, not simultaneous exposure.
- Overfitting risk. Selecting parameters after repeated tests can exploit sample-specific noise. Record every variant tried and evaluate on data excluded from selection. More parameters can increase search flexibility, but no universal weeks-to-failure rule follows.
- Selection hidden by a sales curve. A displayed best variant omits the search that produced it. Check which parameters, datasets and variants were tried; an attractive curve alone proves neither profitability nor dishonest intent.
- Different operating conditions. A rule may behave differently when spread, volatility or price structure changes. Inspect its filters and risk limits rather than assuming every EA is non-adaptive or every trend rule necessarily profits in a trend.
A position on the symbol need not belong to the EA
Test the EA's scope as well as its entry condition. Sharing a symbol does not establish ownership.
Scroll sideways to see the full diagram
Assumptions: One fictional MT5 hedging account; three separate EUR/USD buy positions with the same contract type and volume unit. P1: manual 0.10 lots; P2: EA A 0.20; P3: EA B 0.05. Our registry assigns only P2 to A. At observation there are no other positions, pending orders or list changes. P1/P2/P3 are model labels, not actual tickets.
The account uses hedging: three separate buys of the same symbol. Total volume is 0.10 + 0.20 + 0.05 = 0.35 lots. Our model authorizes EA A to manage only P2: 0.20 lots. The other 0.15 lots shares the symbol but is outside its scope. Checking EUR/USD alone is insufficient.
Specify the EA's position-selection rule: account, symbol, position identifier and agreed strategy label. Here we use an unambiguous P1/P2/P3 ownership registry. We do not assume that magic number automatically prevents another program from reusing the number. ORDER_MAGIC helps identify an EA, but unique-value conventions must be agreed.
MT5 rules allow multiple positions on the same symbol in hedging mode. Position properties include identifier, magic, symbol and volume; PositionGetTicket allows iteration over the position list. Checking must not stop at the first matching symbol. This example concerns scope selection, not closure instructions, margin calculation or a netting account.
How to test a robot before you let it near your money
- Test in a compatible environment. Use the tool and data mode required by the actual programme. MT5 offers recorded and generated tick modes; real ticks do not recreate future liquidity. A simple bar-open rule and intrabar logic need different checks. See Forex Tester and the built-in testers.
- Separate sensitivity and unseen-period evaluation. Changing neighbouring parameters tests sensitivity; it does not by itself diagnose overfitting. Walk-forward analysis repeatedly fits on earlier windows and evaluates later windows. Keep selection history and prevent future-data leakage; the two controls answer different questions.
- Check current operation on a permitted demo environment. Test entry, partial fill, restart, stale data and rejection handling. Set coverage criteria in advance; no universal several-month duration certifies the programme, and demo fills need not match live liquidity.
- Check whether feasible volume fits the loss budget. In a separate hypothetical USD account, EUR/USD has EUR 100,000 per lot, minimum 0.01 lot and pip 0.0001. That minimum has USD 0.10 per pip: a 50-pip adverse fill is USD 5 before an assumed USD 2 round-turn charge, or USD 7 total. It exceeds a USD 5 budget even without a larger gap. These contract and fee inputs are assumptions, not a universal minimum or loss cap.
- Define any live-use decision and size limits in advance. A positive test or a small similar live sample does not require increasing exposure. Reconcile discrepancies and keep aggregate risk within the stated plan before making another decision.
Choose evaluation windows from data coverage, sample dependence, intended operating regimes and a documented test protocol. Six months to a year is not a universal validation threshold; elapsed time alone does not establish safety or profitability.
Where to look for a robot, and where certainly not
MQL5 Market rules describe formal technical checks, not a certificate of profitability or error-free operation. They do not establish a universally safest seller or programme. Check the stated functionality, licence, supported version, trial limitations and required permissions. Keep simulated results distinct from genuine live history, and do not infer a refund or complaint rule for every other sales channel from this store’s terms.
Check seller identity, licence terms, evidence, support and applicable purchase rights before paying. A social-media sales channel does not by itself establish whether verification, complaints or refunds exist. A live record can be useful evidence but is not a guarantee.
Your own robot instead of a bought one
Before coding, specify the observation, entry/exit rules, volume calculation, limits and failure behaviour. Manual trading for a fixed number of months is not a prerequisite for every strategy; some rules require automation to test or execute. A well-specified idea can still be unprofitable. Evaluate the rule, programme correctness and operating environment separately.
You can learn MQL5 using a simple MT5 robot, or commission implementation against a written specification. Neither route is always faster. Agree test cases, source or licence access, supported dependencies and maintenance responsibilities. Confirm how the programme identifies its own positions and prevents duplicated actions after restarting.
What to do before you launch your first robot
- Write a testable specification. Include entry, exit, volume, position selection, limits, restart recovery and the response to unknown server status. Distinguish pausing new entries from cancelling orders or closing positions.
- Inspect the permitted trial mode. MQL5 Market’s EA demo versions are tested in the built-in Strategy Tester, not run on an online chart. A separate licensed demo-account run may require a suitable purchase or rental. Record what was actually tested rather than treating a month-long trial as proof of overfitting.
- Inspect the evidence before paying. Ask for provenance, complete periods, trades, equity drawdown, open exposure and costs. A real-account record can add information; refusal leaves the claim unverified, rather than proving a particular offence. Check the applicable licence and support terms.
Related material: if you are still weighing up the approach itself, our comparison of algorithmic and manual trading shows what each really costs in time and in skill.
Check your understanding
One short exercise
About 2 min · you can try again
Our registry assigns only P2 to EA A. EUR/USD positions P1, P2 and P3 have 0.10, 0.20 and 0.05 lots. Which volume is in A's scope?
- 0.35 lots, because all positions share the symbol.
- 0.20 lots.
- 0.15 lots, the sum of the other positions.
Check the answer and explanation
0.20 lots.
P2 has 0.20 lots and is the only position assigned to A. The other two total 0.15 lots outside its scope.
Frequently asked
Why do most off-the-shelf robots stop making money?
The question does not establish that most products first make money and then fail. Possible problems include selection on historical noise, omitted costs, implementation errors and changed conditions. None is diagnosed by a 95% win rate alone. In our hypothetical sample, 95 wins of USD 10 and five losses of USD 250 give USD −300 before costs. Inspect payoff, open exposure, equity and selection history rather than treating the percentage as proof of fraud or success.
Where can I buy an Expert Advisor without being scammed?
No marketplace establishes that every purchase is free from fraud or risk. MQL5 Market checks sellers and formally tests products under its rules, but explicitly does not guarantee profitability or error-free operation. Read functionality, licence, compatibility, trial and support provisions before payment. Other channels have their own terms and applicable rights; do not assume none offers verification, complaints or refunds. A verified live record is evidence with limitations, not a guarantee.
How do I test a robot before running it on a real account?
Check rule correctness and failure handling first, then historical data/mode, costs and selection history. Test sensitivity separately from out-of-sample or walk-forward evaluation. Use a permitted current demo environment for restart, permission and order-state checks. Determine sufficient coverage and risk limits before seeing results; no fixed six-to-twelve-month duration, MT5-only tool, 0.01-lot minimum or automatic increase certifies every EA. Incompatible code and data must be adapted, not merely loaded into another tester.
Is an Expert Advisor a good idea for a beginner?
It can be a learning or implementation tool if the user can explain its rules, data, permissions and risks. Beginner status alone neither disqualifies it nor proves suitability. Start with a controlled specification and tests; months of profitable manual trading are not a universal prerequisite. A purchased curve or AI label does not establish an edge, and an EA can be semi-automatic rather than manage the whole strategy.
Sources & bibliography
-
MetaQuotes MQL5 Documentation · Official MQL5 documentation. www.mql5.com ↗
-
MQL5 Market EA Marketplace · The MQL5 marketplace for Expert Advisors and other trading applications. www.mql5.com ↗
-
BabyPips School of Pipsology — Forex Lessons · Forex education lessons, including material relevant to algorithmic trading. www.babypips.com ↗
-
MetaQuotes — MQL5 Reference OnTick: event processing and trading permissions · NewTick events are not added while one is queued or processed; disabling AutoTrading blocks trade requests, not EA logic. The queue differs from tick history. www.mql5.com ↗
-
MetaQuotes — MQL5 Market Rules of Using the Market Service · Formal product checks, tester-only EA demo versions and explicit limits on profitability and error-free-operation assurances. Applies to this service. www.mql5.com ↗
-
MetaQuotes MT5 Strategy Testing · Recorded/generated modes, EA-request delay scope, forward periods and shortcut exclusions. These are simulation controls, not future liquidity guarantees. www.metatrader5.com ↗
