MT5 Expert Advisor Development
You write the rules. We implement them in MQL5 as a working Expert Advisor that runs on your own MetaTrader 5 terminal, …
Read moreThe two languages look similar and are not. Choosing wrong means paying twice, because almost nothing carries across.
This is the single most expensive misunderstanding in this field. MQL4 and MQL5 share a surname and a syntax family, but the order model underneath them is not the same. An MQL4 Expert Advisor cannot be "upgraded" to MQL5 by changing a few function names. In practice a port is a rewrite with the original as a specification.
If you are commissioning new work, decide once, at the start, and build only for that platform.
MQL4 thinks in orders. Every market position and every pending order is an
order with a ticket, and you loop through them with OrdersTotal() and
OrderSelect().
MQL5 splits that into three separate things:
That split is why MQL5 code is longer, and also why it is more honest: it tells you what you asked for and what actually happened as two separate facts. Any logic that counts open trades, modifies a stop or closes partially has to be written completely differently.
// MQL4 — one loop over orders
for(int i = OrdersTotal()-1; i >= 0; i--)
{
if(!OrderSelect(i, SELECT_BY_POS)) continue;
if(OrderMagicNumber() != MagicNumber) continue;
// ... act on the order
}
// MQL5 — positions are their own collection
for(int i = PositionsTotal()-1; i >= 0; i--)
{
ulong ticket = PositionGetTicket(i);
if(ticket == 0) continue;
if(PositionGetInteger(POSITION_MAGIC) != MagicNumber) continue;
// ... act on the position
}
MT5 accounts come in two kinds. On a netting account you hold one position per symbol; a second buy adds to it rather than opening a separate trade. On a hedging account you can hold several independent positions, the way MT4 always worked.
Most retail MT5 accounts in India are hedging accounts, but not all of them, and software written for one behaves incorrectly on the other. This is something worth confirming with your broker before the build starts, not after. We ask for it in the first message for exactly this reason.
| Capability | MT4 | MT5 |
|---|---|---|
| Timeframes available | 9 | 21 |
| Strategy tester | Single-threaded, one symbol | Multi-threaded, multi-symbol, distributed |
| Real tick history testing | No | Yes, where the broker supplies it |
| Economic calendar in-terminal | No | Yes, readable from code |
| Depth of market | No | Yes |
| Indian exchange segments | Rare | Supported by several brokers |
| Language features | C-like, limited | Classes, templates, standard library |
The multi-symbol tester matters more than people expect. If your rules apply to a basket of symbols, MT4 simply cannot test the basket as one system; you test each symbol separately and the combined exposure stays invisible.
Only two situations, in our experience:
Everything else — new builds, Indian-market work, anything with a basket, anything you want tested properly — goes to MQL5.
People assume a port is cheaper than a new build. It usually is not. The logic has to be re-derived from code that was written for a different order model, and old MQL4 code is often undocumented. Budget a port at roughly the same as a fresh build, and treat anything cheaper with suspicion.
Where a port is genuinely cheaper is when you hold a clear written specification — then we build from the specification and use the old code only to settle ambiguities.
Confirm three things with your broker and have them in writing:
Those three answers decide the platform, and the platform decides everything else.
You write the rules. We implement them in MQL5 as a working Expert Advisor that runs on your own MetaTrader 5 terminal, …
Read moreSoftware you already own, fixed or extended — and deployed on a VPS so it keeps running when your own machine is o…
Read moreSend your rules, your script or your existing file on WhatsApp and we will reply with a written scope, price and timeline.