You can write code that is broadly compatible with both MQL4 and MQL5, with a few notable exceptions such as order handling and iCustom.
These exceptions can be dealt with by #ifdef directives if you really want to.
But you would still need to compile a version for MT4 and a different version for MT5 (see @whroeder1's post above).
In summary: not all MQL4 code can be compiled for MQL5, but some can be provided you have a good working knowledge of both languages.
is it possible to run MQL5 EAs in a broker that supports only MT4? I have chatted with the broker's customer support and they say.. "you could try... but we don't give support on EAs". So I would like to ask the forum according to your experience to know if I shoud then program in MQL4. Thanks a lot,
They are not directly compatible with each other without modification.
They are not directly compatible with each other without modification.
I assume MQL4 is still nowadays more extensively used despite MQL5 is here long time ago...
Thanks to all.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
is it possible to run MQL5 EAs in a broker that supports only MT4? I have chatted with the broker's customer support and they say.. "you could try... but we don't give support on EAs". So I would like to ask the forum according to your experience to know if I shoud then program in MQL4. Thanks a lot,