MetaTrader
MT4, MT5, Expert Advisors, indicators and MQL programming.
MetaTrader is the platform most retail forex trading runs on, in two versions that are not compatible with each other, and it is where automated trading actually happens. This section covers the platform itself, the robots that run on it, and the problems people run into, which is most of the traffic on any support forum in this field.
MT4 and MT5 are different programs
Despite the names, MT5 is not an upgrade of MT4. It is a separate program with a different language, a different account model and a different order system. A robot written for one will not run on the other, and the file extensions differ: .ex4 and .mq4 against .ex5 and .mq5.
| MetaTrader 4 | MetaTrader 5 | |
|---|---|---|
| Language | MQL4 | MQL5 |
| Account model | Hedging: several positions per symbol, both directions | Netting or hedging, depending on the account |
| Order execution | Simple | Filling modes: fill or kill, immediate or cancel, return |
| Strategy tester | Single thread, one symbol | Multi-thread, multi-symbol, real ticks |
| Timeframes | 9 | 21 |
The netting difference is the one that breaks ported robots. On a netting account, opening a buy while a sell is open does not create two positions, it closes or reduces the first. A system that assumes it can hold both sides will behave in ways its author never tested.
What an Expert Advisor can and cannot do
An Expert Advisor, usually shortened to EA, is a program attached to a chart. On each incoming tick it can read prices and indicators, and it can open, modify and close orders. That is the whole of its power.
What it cannot do:
- Know anything you did not give it. It sees the symbol it is attached to and whatever else it was written to read. It does not read the news and it does not know your account’s purpose.
- Escape your broker’s rules. Minimum stop distance, volume step, maximum position, allowed instruments and trading hours all apply exactly as they do to you.
- Run while the platform is closed. Close the terminal, lose the internet, or let the computer sleep, and it stops. This is what a VPS is for.
- Guarantee an outcome. It executes rules faithfully, including bad ones, and it will do so without hesitation all the way down.
What this section covers
The pieces below are being published in this order, starting with the problems, because those are the questions with the clearest answers and the worst existing coverage.
- Problems: a robot that does not open trades, one that works on demo but not live, the platform error codes that block orders, and what the build number means.
- Setup: installing on MT4 and on MT5, loading preset files, and whether a VPS is needed.
- Understanding before buying: what grid, martingale, recovery and hedging really do to an account, how to read a robot’s inputs, what account type and spread each kind needs, and the prop firm rules that disqualify automated accounts.
Before running any automated system
Three questions answer most of what matters, and a product that will not answer them has told you something:
- Does every position carry a stop loss? If exits depend only on a signal, there is no defined worst case.
- Does it ever add to a losing position? If yes, how many times, at what sizes, and what does the full sequence cost if price never comes back. See margin for why this breaks accounts.
- Does it size from a risk percentage, or a fixed lot? A fixed lot means the risk per trade drifts as the account grows or shrinks.
No page in this section publishes profit figures, win rates or backtest results, for any product, including software the author of this site sells. The reasoning is in the editorial policy.
Where to start
If something is broken right now, go to the troubleshooting pieces below. If you are deciding whether to use an automated system at all, read risk management first, then come back. If the vocabulary is still new, start with forex for beginners.