MetaTrader 5

MT5 bots: what MetaTrader 5 adds for automation

MetaTrader 5 is not an incremental update to MT4. Different language, different accounting model, and a strategy tester that is genuinely better at telling you whether a system works.

  • Running an EA on MT5
  • VPS and connectivity
  • MT5 vs MT4
  • MarketPro EA status

Last reviewed by the MarketPro research desk · Editorial policy

Short answer

An MT5 bot is an Expert Advisor. A program written in MQL5 that runs inside MetaTrader 5 and trades automatically. It attaches to a chart, receives every price tick and can open, modify and close orders on its own. The terminal must be running and connected for it to work at all, which is why an MT5 bot in serious use lives on a VPS rather than a laptop.

Key takeaways

  • An MT5 bot only trades while the terminal is open and connected. Close it and everything stops, including exits.
  • MQL5 is not compatible with MQL4. An MT4 EA cannot run here without being rewritten.
  • AutoTrading must be enabled globally and per-EA before anything is placed.
  • A VPS near the broker's servers keeps it online and cuts execution latency.
  • The MarketPro EA for MT4 and MT5 is not available to download yet. The waiting list is open in the app.

Running a bot on MetaTrader 5

An MT5 bot is an Expert Advisor written in MQL5, compiled to .ex5 and placed in MQL5/Experts. MQL5 is much closer to C++ than MQL4 was: proper object orientation, a standard library, and structured trade-request handling.

Four things MT5 gives an automated strategy that MT4 does not:

  • A multi-currency, multi-threaded strategy tester with real tick data. It can test a portfolio strategy across instruments simultaneously, and it runs orders of magnitude faster, which makes proper out-of-sample and walk-forward testing practical rather than theoretical.
  • Netting or hedging accounting. Netting keeps one net position per instrument, which is how institutional systems think. Hedging preserves MT4's independent-ticket model. The mode is set on the account and materially changes how an EA must be written.
  • Market depth and tick volume, on brokers that supply them.
  • Event handlers beyond ticks (OnTimer() for scheduled logic and OnTradeTransaction() for order events) which allows cleaner designs than polling on every tick.

MT5 versus MT4

The decision is usually made for you by two things: which platform your broker offers for the instruments you want, and whether any EA you intend to run is compiled for it. Beyond that:

  • Choose MT5 if you are developing your own systems, testing across multiple instruments, or want tick-accurate backtests. The tester alone is the reason.
  • Choose MT4 if the EA you want to run only exists in MQL4, or your broker's MT4 offering has better conditions for your instruments. Its ubiquity is a genuine advantage.

One trap worth naming: netting mode changes strategy behaviour. An EA written for MT4's independent tickets, run on a netting account, will find its "second position" has merged into the first. Confirm the account mode matches what the EA expects before running it on anything live. The MT4 comparison table lays out the rest of the differences.

Why a VPS is not optional

An EA is not a service running somewhere; it is code executing inside your terminal. If the terminal is closed, the machine sleeps, the internet drops or Windows restarts for an update, the EA stops. Positions it opened stay open, unmanaged, with no trailing stop and no exit logic.

That is the actual risk. A missed entry costs you an opportunity. A missed exit costs you money, and it happens at exactly the moment you would most want the software running.

A VPS solves it: a machine that never sleeps, on a connection that does not drop, ideally in the same data centre region as your broker's servers so execution latency is measured in single-digit milliseconds. Many brokers provide one free above a volume or balance threshold; otherwise a suitable one costs a few dollars a month. Against the cost of one unmanaged position, that is not a close decision.

What an automated system cannot do

Four limits are structural rather than a matter of build quality, and understanding them is most of what separates people who use automation well from people who lose money to it.

It cannot know what it has not been shown. A rule set encodes past relationships. When the regime changes (a trending market turns to chop, a correlation that held for two years breaks) the system keeps applying yesterday's logic with full confidence and no awareness that anything has changed.

Backtests overstate almost everything. A backtest with clean fills, fixed spread and no slippage is not a simulation of trading, it is a simulation of arithmetic. Add realistic spread, variable execution and the requeues that happen in fast markets, and a strategy that looked excellent frequently becomes marginal.

Optimisation finds coincidences. Tune enough parameters against enough history and you will find a setting that fits it perfectly. That setting describes the noise in that particular sample, not a property of the market, and it stops working the moment it meets data it was not fitted to. This is curve-fitting, and it is the single most common reason a purchased system fails.

Recovery logic hides risk instead of removing it. Martingale and grid systems produce beautiful equity curves for months, because doubling into a losing position converts many small losses into rare enormous ones. The curve is not evidence of an edge; it is evidence that the loss has not arrived yet.

The MarketPro Expert Advisor

MarketPro is building an Expert Advisor for MetaTrader 4 and MetaTrader 5. It is not available to download yet, and this page will say so until it is.

What is open today is the waiting list. Install the app, open the EA tab, and join it; everyone on the list is emailed when the builds go live. There is no charge and no card involved in joining.

When it does ship, three things will be true about it by design:

  • You install and run it. It executes on your terminal, on your account, under your configuration. MarketPro never touches your account and exercises no discretion over your funds.
  • It ships with a kill switch and an explicit as-is licence with no performance guarantee.
  • Availability is limited by region. Distribution is restricted, and eligibility is determined by residence rather than by a checkbox on a page.

Meanwhile the thing that is live is the signal feed: vetted trade ideas with entry, stop and three targets that you place yourself. That is the manual equivalent of what the EA will automate, and it is available today with one free signal a day.

Written and reviewed by the MarketPro research desk

MarketPro is a trading-signal and trading-education app operated by Harajuku Holdings LTD (Cyprus). Our signal desk publishes and tracks every trade idea in-app, and every page here is checked against the app's live behaviour before publishing. Last reviewed . How we produce signals and content · About MarketPro

MarketPro EA status: coming soon

The MarketPro Expert Advisor for MetaTrader 4 and MetaTrader 5 is not available to download yet. The in-app waiting list is open, and everyone on it is emailed the moment the builds go live. Vetted signals are available today in the app. Get MarketPro free and join the EA waiting list from the EA tab.

The MarketPro Expert Advisor is software you install and run yourself on your own MetaTrader terminal. MarketPro does not trade on your behalf, does not manage your account, and exercises no discretion over your funds. It is supplied as-is with no performance guarantee, and availability is limited by region.

FAQ

Frequently asked questions

How do I add a bot to MetaTrader 5?
File → Open Data Folder, copy the compiled file into MQL5/Experts, restart the terminal, then refresh Expert Advisors in the Navigator. Drag it onto a chart, enable "Allow algorithmic trading" in the dialog, and turn on the AutoTrading button in the toolbar. A smiling face on the chart means it is running. The Expert Advisor guide has the full walkthrough.
Can I run an MT4 bot on MT5?
No. MQL4 and MQL5 are different languages with different order-handling models, so an EA has to be compiled for the platform it runs on. Converting between them is a development job, not a setting.
Do I need to keep MetaTrader 5 open for the bot to trade?
Yes. The EA runs inside the terminal, so if the terminal is closed or the machine loses its connection, the bot stops. Including the logic that would have closed an open position. This is the main argument for a VPS.
Does MarketPro have an MT5 bot?
A MarketPro Expert Advisor for both MetaTrader 4 and MetaTrader 5 is in development and is not available to download yet. The waiting list is open in the app, and everyone on it is emailed when the builds go live. The signal feed is live today.
Trade · Learn · Earn

Signals now, EA later

The MarketPro EA is in development and the waiting list is open. The vetted signal feed is available today, free, one signal a day.

Not investment advice. Past performance is not indicative of future results.