Convert mq4 to mq5

 

Is there a functioning program to convert a mq4-EA to mq5-EA?

Thanks!


traderdoc

 
I doubt it as they are are very different systems, especially the trading functionality.
 
Why this? There are functions and words of coding language of MQL4, which translated in these of MQL5.
 
Just try to open a new mq5-EA and paste your mq4-code totally in the new one and compile it and correct some of the function names ...
 
gooly:
Just try to open a new mq5-EA and paste your mq4-code totally in the new one and compile it and correct some of the function names ...

Thanks but sorry, what is that for an idea?

This solution is too expensive at 2000 and more lines of code.

 
gooly:
Just try to open a new mq5-EA and paste your mq4-code totally in the new one and compile it and correct some of the function names ...

You must be kidding! The trading functions and order management concepts are totally different between MQL4 and MQL5. There is NO WAY that the operation is just a simple "correct some of the function names" intervention.

If the OP were talking about Custom Indicators, that might work, but there is NO WAY it is that simple for an EA.

 
traderdoc:
Why this? There are functions and words of coding language of MQL4, which translated in these of MQL5.

Have you even read the MQL5 Documentation, especially with regards to the Trade functions? If you had, you would have seen that they are very different.

Had it been a simple solution to convert MQL4 to MQL5, MetaQuotes themselves, would have written such a conversion in order to facilitate and promote a changeover to MQL5.

That is however not the case, because conversion between MQL4 and MQL5 is not a simple linear process.

 
FMIC:

You must be kidding! The trading functions and order management concepts are totally different between MQL4 and MQL5. There is NO WAY that the operation is just a simple "correct some of the function names" intervention.

If the OP were talking about Custom Indicators, that might work, but there is NO WAY it is that simple for an EA.

No I am not kidding! I know there is an EA or indicator which was transferred to mq5 exactly that way.

Remember C++ is a successor of C and C-code with little changes can be compiled by a C++ compiler. Try it yourself!

 
I had found a converter from 2011 via Google that no longer works but today.
 
gooly:

No I am not kidding! I know there is an EA or indicator which was transferred to mq5 exactly that way.

Remember C++ is a successor of C and C-code with little changes can be compiled by a C++ compiler. Try it yourself!

Gooly! I am a Software Developer by trade and I know very well what I am talking about because I code in both MQL4 and MQL5, although I have more practice with MQL4. I started coding in C and C++ since back when C++ was first invented in 1983/4 (I was 15/16 at the time).

You say you know of such a case with an EA or Indicator, but in there lays the ultimate difference. There is a very big difference between converting an Indicator or converting an EA. Converting an indicator, especially if coded in the modern style, can be relatively easy, depending on its complexity, but an EA is a totally different ball game.

Most MQL4 EA's Are NOT going to be easily converted into MQL5 just by changing function names. The Trade functions and Order management is completely different. If you say, that such an EA was easily converted from MQL4 into MQL5, then it must be, that the EA in question was already very well structured (and possible written in OOP) which facilitated the conversion, but it was definitely not an easy or linear process.

 

FMIC, I said try not that it will work! Beside that I have no idea about his EA (size, indicator calls, ...).

Beside that I have the feeling that mqh are compiled as if they were in mq5 and not mq4 - but I could be wrong!

Reason: