---
title: "MetaTrader 4 vs MetaTrader 5: what actually differs · CloudSat"
description: "MetaTrader 4 vs MetaTrader 5 on what changes in practice: the order model, hedging and netting, MQL4 vs MQL5, the strategy tester and server needs."
url: https://cloudsat.io/learn/metatrader-4-vs-metatrader-5-differences
updated: 2026-11-18T12:00:00Z
source: CloudSat (https://cloudsat.io/). Prices in USD.
---

[Trading and crypto](https://cloudsat.io/learn/topic/trading)

# MetaTrader 4 vs MetaTrader 5: what actually differs

MetaTrader 4 vs MetaTrader 5 on what changes in practice: the order model, hedging and netting, MQL4 vs MQL5, the strategy tester and server needs.

CloudSat team November 18, 2026 6 min read

MetaTrader 4 and MetaTrader 5 come from the same company, MetaQuotes, and look alike at first glance. Underneath, they are different platforms: a different trading model, a different programming language and a different strategy tester. That is why an MT4 expert advisor will not load in MT5, and why brokers run separate servers for each. This guide compares what changes for someone who trades on either terminal or automates one.

## Two platforms, two server stacks

Both are client-server systems. You install a terminal; your broker runs the MetaTrader server it connects to. An account lives on one of those servers, so an MT4 login does not work in MT5. Switching platforms means asking the broker for a new account on its MT5 server, not upgrading the software.

MT4 dates from 2005 and was designed around forex and CFDs. MT5 followed in 2010 as a multi-asset platform that can also route orders for exchange-traded stocks and futures. MetaQuotes' own product pages give these headline figures:

|  | MetaTrader 4 | MetaTrader 5 |
| --- | --- | --- |
| Chart timeframes | 9 | 21 |
| Built-in indicators | 30 | 38 |
| Analytical objects | 23 | 44 |
| Pending order types | 4 | 6 |
| Execution modes | 3 | 4 (adds Exchange) |
| Position accounting | One ticket per trade | Netting or hedging, set by the broker |
| Language | MQL4 | MQL5 |
| Process | 32-bit | 64-bit |
| Strategy tester | One symbol, one thread | Multi-currency, multi-threaded, remote agents |
| Built-in economic calendar | No | Yes |

Counts of indicators matter less than they seem, since both platforms load thousands of custom ones. The rows that change how you work are the order model, the language and the tester.

## Orders, deals and positions

In MT4, every trade is an order with a ticket number. A buy and a sell on the same symbol are simply two open orders, so holding opposite trades at once is the default behavior.

MT5 separates three things. An **order** is an instruction, a **deal** is the record of an execution, and a **position** is what you hold as a result. How deals turn into positions depends on the account's accounting system, which the broker sets:

- **Netting**: one position per symbol. Selling 0.5 lots against a 1.0-lot long leaves a 0.5-lot long, and selling 1.5 lots reverses it to a 0.5-lot short.
- **Hedging**: each deal opens its own position, as in MT4, and opposite positions can coexist.

MT5 also adds two pending order types, **Buy Stop Limit** and **Sell Stop Limit**: when the stop price is reached, the terminal places a limit order instead of a market order. A fourth execution mode, **Exchange**, sends orders to an external trading system for instruments that trade on an exchange.

For automation, this is the first thing to check. An expert advisor that assumes it can hold a buy and a sell at the same time misbehaves on a netting account, and code that reads trade history must deal with orders, deals and positions as separate lists.

## MQL4 and MQL5

Both languages look like C++. Since MT4's build 600 in 2014, MQL4 has shared much of MQL5's syntax, including classes and structures, and both are edited in MetaEditor. The real differences sit in the trading and data functions.

Reading a moving average shows the shift. In MQL4, an indicator function returns a value directly:

```cpp
// MQL4: 50-period SMA on H1, last closed bar
double ma = iMA(_Symbol, PERIOD_H1, 50, 0, MODE_SMA, PRICE_CLOSE, 1);
```

In MQL5, you create an indicator handle once, then copy values out of its buffer:

```cpp
// MQL5: create the handle in OnInit(), read it where needed
int handle = iMA(_Symbol, PERIOD_H1, 50, 0, MODE_SMA, PRICE_CLOSE);

double buf[];
if(CopyBuffer(handle, 0, 1, 1, buf) == 1)
   Print("SMA on the last closed bar: ", buf[0]);
```

Trading follows the same pattern. MQL4's `OrderSend()` takes a list of arguments and returns a ticket. MQL5 fills an `MqlTradeRequest` structure, or uses the `CTrade` class from the standard library, and gets back a result structure to inspect.

Compiled programs do not cross over: `.ex4` files run only in MT4 and `.ex5` only in MT5. Moving an expert advisor means porting its source, and the trade logic usually needs a rewrite rather than a find-and-replace. If you buy or rent a program, check which platform it was built for.

MT5 also has an official Python package, `MetaTrader5`, installed with `pip install MetaTrader5`. It connects to a running MT5 terminal to pull bars and ticks and to send orders, which lets Python code drive the terminal. MT4 has no official equivalent.

## The strategy tester

MT4's tester runs one symbol at a time on one CPU thread, and its "Every tick" mode generates ticks from bar history.

MT5's tester is multi-currency and multi-threaded. Its modes range from **Every tick based on real ticks**, which replays the broker's recorded ticks, through **1 minute OHLC** and **Open prices only**, to **Math calculations**, which skips price history entirely. Optimization passes run on local testing agents across the CPU's cores, and the tester can also use remote agents on other machines or the paid MQL5 Cloud Network.

A better tester is still a model of the past. Real-tick replay removes one source of error; it does not make a backtest a forecast.

## What each one needs on a server

The two terminals use hardware differently:

- **MT4 is a 32-bit program**, so one terminal can only address a limited amount of memory. Busy setups run several terminals rather than one large one.
- **MT5 is 64-bit.** Each expert advisor and script runs in its own thread, while all indicators on one symbol share a thread. Live trading leans on fast single cores; optimization leans on core count.
- **Both run side by side.** Install each broker's build in its own folder, or start a copy with the `/portable` switch so its data stays in that folder.

Plan memory per terminal, add more for tick history and the tester, and keep the server close to the broker's trade server; [trading latency explained](https://cloudsat.io/learn/trading-latency-where-the-delay-comes-from) covers how to measure that. On CloudSat, both terminals are available as one-click apps ([MetaTrader 4](https://cloudsat.io/apps/deploy-metatrader4), [MetaTrader 5](https://cloudsat.io/apps/deploy-metatrader5)), and the [MetaTrader 5 hosting page](https://cloudsat.io/solutions/metatrader-5) covers sizing.

## Which one you end up on

The choice is usually made for you by four facts:

1. **What your broker offers** for your account type. Some brokers offer only MT5 for new accounts.
2. **What you trade.** Exchange-traded stocks and futures need MT5.
3. **What code you depend on.** A library of MQL4 programs is a real cost to port.
4. **Which accounting model you need.** Hedging is available on MT5 only if the broker enables it on your account.

If you write small utilities rather than full expert advisors, [MetaTrader 4 scripts explained](https://cloudsat.io/learn/metatrader-4-scripts-explained) shows how one-shot programs work.

## FAQ

### Can I log in to MT5 with my MT4 account?

No. The account sits on the broker's MT4 server, and MT5 connects to a different server. Your broker has to open an MT5 account, which often comes with a new login number.

### Will my MT4 indicators and expert advisors work in MT5?

Not as they are. MT5 will not load `.ex4` files, and MQL4 source must be ported, mostly in its trading and indicator calls. Simple indicators port quickly; trade management code takes longer.

### Does MT5 fill orders faster than MT4?

Fills happen on the broker's side, so the platform alone does not change them. MT5's threading helps the terminal stay responsive with many charts and programs, and its tester runs faster on multi-core machines.

### Can MT5 hold opposite positions on one symbol?

Yes, on a hedging account. On a netting account, an opposite deal reduces, closes or reverses the existing position instead.

*Trading involves risk of loss. Nothing in this article is financial advice.*

**Run it on CloudSat.** Cloud VPS on AMD EPYC and NVMe from $1.98/mo in 13 regions, delivered in under 5 minutes and paid in crypto. [See plans](https://cloudsat.io/plans) or [deploy a server](https://dash.cloudsat.io/console/deploy).

## Keep reading

[All guides in Trading and crypto](https://cloudsat.io/learn/topic/trading)

- [MetaTrader 4 scripts: how they run and how to write one](https://cloudsat.io/learn/metatrader-4-scripts-explained): Trading and crypto MetaTrader 4 scripts: how they run and how to write one 6 min read
- [Trading latency: where the delay in an order comes from](https://cloudsat.io/learn/trading-latency-where-the-delay-comes-from): Trading and crypto Trading latency: where the delay in an order comes from 7 min read
- [Copy trading and trade copiers: how copying actually works](https://cloudsat.io/learn/copy-trading-and-trade-copiers-explained): Trading and crypto Copy trading and trade copiers: how copying actually works 7 min read
- [Demo trading accounts: what they simulate and what they skip](https://cloudsat.io/learn/demo-trading-accounts-what-they-simulate): Trading and crypto Demo trading accounts: what they simulate and what they skip 6 min read
