Download MetaTrader 5

Is MQL5 backward compatible with MQL4?

To add comments, please log in or register
Pierre Rougier
552
Pierre Rougier  

Hello,

Is MQL5 backward compatible with MQL4?

In other words, can I develop my EA in MQL5 and use it under MetaTrader 4?

Regards,

Pierre

whroeder1
17047
whroeder1  
Pierre Rougier: Is MQL5 backward compatible with MQL4? In other words, can I develop my EA in MQL5 and use it under MetaTrader 4?
  1. Developing MQL4 and running it on MT5 would be backwards compatible. Not possible, completely different Paradigm.
  2. You want forward compatible, almost never possible.
Jose Francisco Casado Fernandez
4632
Jose Francisco Casado Fernandez  
Cross-Platform Expert Advisor: Introduction
Cross-Platform Expert Advisor: Introduction
  • 2016.08.15
  • Enrico Lambino
  • www.mql5.com
Table of Contents Introduction Among the reasons to create cross-platform experts advisors in MetaTrader are the following: You are interested in sharing expert advisors with others, regardless of what trading platform version they use.You want to understand the differences between MQL4 and MQL5.You want to save time coding.If MetaTrader 4...
fxsaber
10779
fxsaber  

Cross-platform EA example.

Quantum 103
Quantum 103
  • votes: 10
  • 2017.09.20
  • Iurii Tokman
  • www.mql5.com
Сеточный советник на отложенных ордерах, индикаторы не используются. Управление советником возможно графической кнопкой. Советник автоматически выключается после окончания времени его работы, удаляет все отложенные ордера и принудительно закрывает все открытые позиции, при нажатии графической кнопки происходит тоже самое или перезапуск...
Jack Thomas
2125
Jack Thomas  
Pierre Rougier:

Is MQL5 backward compatible with MQL4?

NO.
The programming language is vastly different in some areas, and as such it is not directly compatible. - Jack
Stanislav Korotky
23332
Stanislav Korotky  
Pierre Rougier:

Is MQL5 backward compatible with MQL4?

In other words, can I develop my EA in MQL5 and use it under MetaTrader 4?

It's compatible by means of 3-rd party libraries (includes), which should be #included into your EA source code.

You may find such solutions in the source code base, blogs, and articles. For example: Ready-made Expert Advisors from the MQL5 Wizard work in MetaTrader 4

Jack Thomas
2125
Jack Thomas  
Stanislav Korotky:

It's compatible by means of 3-rd party libraries (includes), which should be #included into your EA source code.

You may find such solutions in the source code base, blogs, and articles. For example: Ready-made Expert Advisors from the MQL5 Wizard work in MetaTrader 4


Using a third party library isn't the same thing as the two languages being natively compatible with each other.

The question was "Is MQL5 backward compatible with MQL4". The answer is NO.
Stanislav Korotky
23332
Stanislav Korotky  
Jack Thomas:

Using a third party library isn't the same thing as the two languages being natively compatible with each other.

The question was "Is MQL5 backward compatible with MQL4". The answer is NO.

Everyone have a right to have own point of view. No need to post your personal opinion in bold and red.

If you understand the compatibility very strict, someone else (including OP) could accept more flexible meaning of compatibility. Then the answer is something other than NO. If you can add a single include line and your original source code continue running "as is" on other platform this is very very similar to compatibility.

Many features of MQL4 and MQL5 are common!

Jack Thomas
2125
Jack Thomas  
Stanislav Korotky:

Everyone have a right to have own point of view. No need to post your personal opinion in bold and red.

If you understand the compatibility very strict, someone else (including OP) could accept more flexible meaning of compatibility. Then the answer is something other than NO. If you can add a single include line and your original source code continue running "as is" on other platform this is very very similar to compatibility.

Many features of MQL4 and MQL5 are common!

I understand the compatibility probably better than most. I've been a programmer for well over 30+ years.

However the question was "Is MQL5 backward compatible with MQL4?".

The answer is NO it is absolutely not backward compatible.

Again... Using a THIRD PARTY LIBRARY is NOT the same thing as the two languages being compatible.


Also you stated:

Many features of MQL4 and MQL5 are common!

That is irrelevant and shows that you don't understand what BACKWARDS COMPATIBILITY means.

C++, Perl, and PHP have many features that are common with MQL4 and MQL5 as well.

They can import third party libraries, they can all manage mysql databases, and they can all produce the onscreen display of information.

However, simply having features that are common or similar, does NOT make them any more compatible to each other simply because of their abilities.

NO. MQL5 is NOT backwards compatible with MQL4.

- Jack

Jack Thomas
2125
Jack Thomas  
Pierre Rougier:

Is MQL5 backward compatible with MQL4?

NO. They are not backward compatible.


Pierre Rougier:

In other words, can I develop my EA in MQL5 and use it under MetaTrader 4?

They are two different programming languages and are not directly compatible with each other.

- Jack

fxsaber
10779
fxsaber  
Jack Thomas:

I understand the compatibility probably better than most. I've been a programmer for well over 30+ years.

I understand the compatibility probably better than most. I've been a programmer for well over 40+ (forty) years.

So I'm right, and you're wrong!

-Fxsaber


PS Dont be upset. Renat (CEO Metaquotes) understands programming worse than you.

Форум по трейдингу, автоматическим торговым системам и тестированию торговых стратегий

Новая версия платформы MetaTrader 5 build 1640: создание и тестирование собственных финансовых инструментов

Renat Fatkhullin, 2017.10.10 08:10

Я 27 лет безостановочно занимаюсь программированием. 17 последних лет пишу торговые платформы, являюсь руководителем компании и отвечаю за ее результаты.

То, что вы тут показали - это попытка броситься с голой шашкой на танк. Да еще со столь глупыми заявлениями.


Google Translate:

I'm 27 years of non-stop programming. For the last 17 years I have been trading platforms, I am the head of the company and I am responsible for its results.

What you have shown here is an attempt to rush with a naked gun on the tank. Yes, with such stupid statements.

Only 27 years old... Therefore, you are cool!
To add comments, please log in or register