MetaTrader

Understand the platform before choosing the bot architecture.

MetaTrader automation can stay inside an Expert Advisor, connect to Python, or become part of a larger webhook/VPS system. MT4 and MT5 are related but not interchangeable runtimes.

MetaTrader 5 Strategy Tester interface
Hands-on screenshot: MT5 Strategy Tester used to inspect an Expert Advisor before relying on it.

Core terms

An EA is an Expert Advisor that runs inside MetaTrader. MQL4 is used by MT4 and MQL5 by MT5. If the EA runs on your home terminal, the terminal and PC normally need to remain running. A VPS can move that runtime away from your home PC.

Practical example

A realistic MT5 workflow

Write or generate an EA, compile it, fix every compiler error, run Strategy Tester, inspect bad results as well as good ones, then test with very small supervised exposure before trusting the runtime.

MQL5 compile errors from an EA iteration
Compiler errors are not a side issue; they are part of the normal iteration loop.
MT5 optimization table with weak and negative outcomes
Negative optimization outcomes are useful evidence that a rule is not robust enough yet.

MT4

Older platform with a very large legacy ecosystem. Existing MQL4 code can be a strong reason to stay with it.

MT5

Newer architecture, stronger built-in testing capabilities and official Python integration through the MetaTrader5 package.

EA-only architecture

Signal, rules and execution live inside MetaTrader. Fewer moving parts, but tightly coupled to the platform.

MT5 + Python

Python can handle analysis or orchestration while the MT5 terminal provides the platform connection. Both need to be available on the machine where they run.

Hosting choices

MetaTrader VPS is specialized for MetaTrader workloads. A general Windows VPS is more flexible when you need Python, extra programs, files or remote desktop access alongside MetaTrader. Your own PC is fine for learning and supervised testing.

Start with these guides

Common questions

Does an EA need MetaTrader open?

The EA needs a running MetaTrader environment somewhere. That can be your PC, a general VPS or a suitable MetaTrader hosting setup.

Can Python replace MQL5 inside MT5?

Python can integrate with MT5 for many workflows, but it is a separate process and architecture. An EA written in MQL5 runs natively inside the terminal.

Should a new project start with MT4 or MT5?

It depends on broker support, existing code and requirements. MT5 generally offers a newer platform and stronger built-in testing, while legacy MQL4 ecosystems can be a reason to use MT4.

From real MT5 experiments

What iteration looked like in practice

These screenshots come from actual MetaTrader work sessions. They are included to show the development process rather than to advertise a strategy.

MetaTrader Expert Advisors list with multiple bot versions
Versioning

Multiple EA versions accumulated quickly

US500, Gold and other ideas went through repeated revisions. Keeping versions separate made it possible to compare changes and roll back.

Several MetaTrader charts running different Expert Advisors
Small-scale tests

Different EAs running side by side

Small 0.01-size tests were used to observe whether strategy logic and execution behaved as expected on different instruments.

See more real build artifacts, including failed tests and debugging screenshots →