Home › Automation (EAs and bots) › What MQL5 is and what it's for if you trade with MT5

What MQL5 is and what it's for if you trade with MT5

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

What MQL5 is (and what it isn't)

MQL5 is the language used to program the tools that run inside MetaTrader 5: the expert advisors that trade on their own, the indicators that plot data and the utilities that automate terminal tasks. It is the language of the program, not a strategy: an expert advisor can be brilliant or a money-losing machine, and the language has no opinion on that.

Writing it is a programmer's craft. That craft is not taught here: here you learn to trade with judgement and to evaluate and use ready-made tools (including expert advisors and the local bridge we use to share markings). Anyone who wants to devote themselves to writing programs has the official documentation and specific development courses.

What can and cannot be delegated to a program

TaskIs it automated?Why
Calculating position sizeYesIt's arithmetic: risk divided by the distance to the stop and the point value
Placing and moving the stopYesIt's an order with written rules, with no interpretation
Not trading outside trading hoursYesIt's a time condition
Recording each tradeYesYou only have to write down what has already happened.
Deciding where the price is goingNoNo one knows: that is why the expert only executes rules set in advance
Sticking to the plan when you feel like doing the oppositeNoThat is discipline, and you train it in your head, not in the terminal

An expert repeats without blinking what someone wrote: if the rule is bad, it will repeat it a thousand times. That is why position size and limits are calculated before automating anything.

How to evaluate a ready-made expert (without reading a single line of code)

The limits nobody tells you about

The terminal has to be open (there is no windowless mode), with the symbols loaded and the correct permissions; latency and spread affect the real result; a backtest does not certify the future; and a tool you do not understand cannot be switched off with good judgement the day it stops working. Before leaving it alone, it is worth checking the instrument contract on the broker's platform: tick, point value and market pauses.

Why we do not teach programming here

For transparency: the academy trains people to make decisions and manage risk, and to use tools built with judgement. Programming is another profession, and mixing it with trading training produces people who know how to write code and still lose money. What is taught here is how to measure, how to question a backtest and how to calculate how much you lose if the trade goes wrong.

Frequently asked questions

Do I need to know how to program to use an Expert Advisor in MT5?

No. You need to understand what it does, how much it risks and under what conditions it should be used. Installing and configuring is not programming; writing the program is, and that is another trade.

Is MQL5 suitable for trading synthetic indices?

It works for any instrument the broker offers on MetaTrader 5, including synthetic indices, provided the symbols are loaded. What determines the result is not the language, but the rules and the size of each trade.

Can I trust an Expert Advisor because the backtest looks good?

Not for that reason. A backtest is an experiment on the past, and it is enough to change the period or add the real costs for the result to change. Use it to rule out ideas, never as a promise.

Automating what already works

At the academy, expert advisors are used for what risk demands: calculating size, placing stops and respecting limits. Never to guess the market.

Automation guides →

Keep reading

Risk warning. Synthetic indices and CFDs are leveraged products with high risk of loss; most retail accounts lose money. Educational content, not financial advice.