Home › Guides › Automation

EA and bots for MetaTrader 5: what can be automated and what cannot

By Luis Sanches y Milton Bertillo, mentors at SHEFA Trading Academy · Updated on 21 September 2026 · Reading time: 9 min

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.

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 wellCannot 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 practical rule: automate what you already know how to measure and repeat by hand. If you cannot write the rule in one sentence with a number in it, you are not ready to program it yet.

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.

How an EA works inside →

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.

How copy trading works →

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 four checks before letting it trade on its own

  1. 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.
  2. Risk defined per trade and translated into lot size with the formula, not with a fixed figure. Daily and weekly limits are also programmed.
  3. 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.
  4. 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.

See access plans →

Continue reading

Risk warning. Synthetic indices and CFDs are leveraged products with high risk of loss; most retail accounts lose money. Automation does not reduce that risk on its own: an EA can execute losses as effectively as it executes wins. Educational content, not financial advice.