EA and bots for MetaTrader 5: what can be automated and what cannot
An EA (expert) is a program that trades for you following your rules. That's all: it doesn't guess, it has no instinct and it doesn't know what is going to happen. That is precisely why it is useful: it always does what you have told it, even on the day you wouldn't. The interesting question is not ‘which bot do I buy?’, but ‘which part of my trading can I delegate without delegating judgement?’.
What exactly is an EA
An Expert Advisor is a program in MQL5 that runs inside MetaTrader 5. It is attached to a chart and, from there, receives the terminal's events: every new tick, every timer you ask it for, every change in the account. With that information it decides whether to do something or to do nothing.
- It executes explicit rules: if A happens and B is met, then it opens with lot L, stop S and target T.
- It does not interpret: it doesn't know that there is important news today or that the market ‘is strange’. If you don't program a filter into it, it doesn't have one.
- It is deterministic in execution, not in the result: it will always do the same thing; what the price does afterwards is another story.
- It lives inside the terminal: if you close MetaTrader 5, the EA stops trading. To work 24/7 it needs a machine that is switched on (or a server).
What can be automated (and what cannot)
This table is the most useful summary in the whole guide. The left-hand column is where an EA really adds value; the right-hand column is what those who promise too much sell.
| Can be automated well | Cannot be automated |
|---|---|
| Lot calculation based on risk and distance to the stop. | Predicting the direction of price or the exact timing of an event. |
| Placement of the stop and target at the same instant as entry. | Guarantee results: no EA eliminates the risk of losing. |
| Risk limits: maximum per trade, per day and per week. | Avoid a gap at the weekend (the stop does not guarantee the price). |
| Time discipline: close after X minutes or before the market closes. | Replace the criteria when the context changes regime. |
| Repeatable execution: the same conditions, the same size, without fatigue. | Fixing a system with no edge: automating it only speeds up the outcome. |
| Objective filters: schedule, maximum spread, minimum volatility, number of trades per day. | Understanding what the market does: that is still down to you. |
The three ways to automate (and how they differ)
1 · Local EA in MetaTrader 5
The program runs on your terminal, with your account and your symbols. It is the most direct way and the one we use for the part of risk management: calculating the lot size, placing the stop, limiting the time in position and closing by rules.
2 · External signals
A system outside the terminal (a website, a channel, a script) generates alerts and you execute. It automates the analysis part, not the execution part, and depends on you being there at the right moment.
Useful for learning to read, useless for trading while you sleep.
3 · Local bridge (copy trading)
An intermediary program connects what one account does with what another does, without exposing passwords or servers: what is published is the marking (symbol, direction, levels) and the student executes with their size and their risk.
And a warning
None of the three turns bad trading into good. Automation improves execution; the edge still lies in the rules, and you decide the rules.
Why synthetic indices are different
- The market is open 24/7: there is no closing bell forcing you to stop. A time limit programmed into the EA is often the difference between trading and overtrading.
- There is no news and there are no gaps: you do not need macro filters, and rules that depend on external ‘events’ add nothing here.
- Crash and Boom events are random in their timing: an EA cannot anticipate the spike. What it can do is size the position to survive it and limit how long it is exposed.
- Each instrument has its own contract: the point value changes between Volatility, Step, Crash and each broker's own indices. An EA that does not read the symbol specification is calculating the lot size incorrectly. Here is the formula.
The four checks before letting it trade on its own
- Written, measurable rules. Entry condition, size, stop, target and what it does if something fails. If it is not written down, it is not programmed.
- Risk defined per trade and translated into lot size with the formula, not with a fixed figure. Daily and weekly limits are also programmed.
- Test with the data from the broker you are going to trade with, including spread and commission. In synthetic indices, historical data comes from the broker itself: if you change broker, the history changes.
- Real-time demo account for a period that includes bad days. Backtesting and real execution never match to the cent.
The mistake of believing the backtest
A backtest answers a very specific question: what would have happened if these exact rules had been applied to this exact data? Nothing more. The most deceptive pitfalls:
Over-optimisation
Moving the parameters until the curve looks pretty makes the system fit the past rather than the future. If your EA needs very precise values (‘enter at 43,7 points’), you have probably fitted noise.
Forgotten costs
Spread, commission, swap and slippage change the result. A system that makes 3 points per trade can be a loser just because of the entry cost.
Single regime
Ten years of history can be a single type of market. In synthetics, moreover, the volatility of each index is set by the broker and can change.
Small sample
Fifty trades prove nothing. With little data, any result is compatible with chance, in either direction.
How we work on it at the academy
The order is always the same: first the rule is written, then it is measured by hand, then the risk is calculated and only then is it automated. Our tools for MetaTrader 5 (the in-house experts and the TITAN BRIDGE, the local connector that shares price marks between accounts) exist for that: so that the repetitive part is done by the machine and the decision remains human.
Frequently asked questions
What is an EA or expert advisor in MetaTrader 5?
A program in MQL5 that runs inside the terminal and trades on its own following your rules: when to enter, with what size, where the stop is and when to close. It doesn't think, it executes. That is why an EA with bad rules will execute them with perfect discipline.
Does a trading bot guarantee profits?
No, none does. An EA does not create an edge where there is none: if the rules have negative expectancy, automating them accelerates losses. What it does eliminate are human execution errors: calculating the lot, respecting the stop, not doubling after a loss and not trading outside trading hours.
Can synthetic indices such as Volatility or Boom be automated?
Yes, with nuances: an EA applies rules, limits time in position and calculates the lot size by risk, but it does not anticipate the Boom spike or the Crash plunge, because their exact timing is random within an average frequency. In those instruments the value lies in size and time, not in prediction.
What do I need to start automating?
Written and verifiable rules, position size resolved, a backtest with data from the same broker and a real-time demo test. Without all four, it is not automation: it is delegating to something you do not understand.
Why is my EA not opening trades?
Almost always because of something unrelated to the strategy: “Algo Trading” disabled, symbol without history, lot calculated below the broker's minimum, stop shorter than the minimum allowed, daily market break or a time filter. The Experts log usually says exactly what is happening.
Does a good-looking backtest mean the EA works?
No. A backtest only answers “what would have happened with these rules on this data?”. The most common mistakes are over-optimising, forgetting spread, commission and swap, ignoring slippage and testing in a single market regime. It serves to rule out bad ideas; it does not certify good ideas.
Automate the boring part, decide the important part yourself
At the academy, risk calculation, stop placement and time discipline are automated. The rest is learned by hand, because it is what keeps the account going when the market changes.
Continue reading
- How an EA works internallyThe event loop, how it sends orders and why sometimes it does nothing.
- Installing an EA in MetaTrader 5 step by stepWhere the file goes, how to activate it and the typical errors that prevent it from trading.
- Copy trading with MT5: how to copy tradesWhat is copied, what is not, and why each account has to calculate the size.
- Copying trades between MT5: how it is actually doneThe three ways, what is replicated from risk, the effect of latency and the checklist.
- Why MT5 does not run my EA (and how to find out)The six causes in order of frequency and the five-minute diagnosis with the Journal.
- VPS for MetaTrader 5: where to run an EAWhat a server needs to trade non-stop and what still fails afterwards.
- How to calculate the lot per tradeThe formula every EA needs to have properly worked out.
- All guidesFull index: synthetics, instruments, trading, automation, forex and gold.