Download MetaTrader 5

How do you convert your MQL5 EAs to MQL4? - issues with comments

To add comments, please log in or register
Grzegorz Korycki
62167
Grzegorz Korycki  

I know it is rather MQL4 question, than MQL5, but i know many developers are doing conversions from MQL5 to MQL4. After recent modifications it is pretty easy, but there is one catch.

New MQL compilers (both from MT4 and MT5 that are similar) whilie compiling MQL4 strategies dont put the comments in the code - like // MA Period

displaying variable instead. And in older MQL compiler versions it was working fine. What to do to handle that issue? I have instructions made to describe function names in form of comments,

do i really have to convert either also instructions to MT4, ro change entire variable names to match comments? (old presets would not work though!) How do you handle that MQL5 developers?

 

Attaching screenshots to show what i mean.

 

PS. I already reported that issue to service desk, but in service desk it can take months and I want to release mt4 versions of my MQL5 strategies as soon as possible.

Alain Verleyen
Moderator
33816
Alain Verleyen  

Add the following line in top of your code :

#property strict
Grzegorz Korycki
62167
Grzegorz Korycki  
ohhh... it was that simple. Thank You again.
Hector Pacheco
17696
Hector Pacheco  
angevoyageur:

Add the following line in top of your code :

Thank you very much
Mehrdad Rezvani
117
Mehrdad Rezvani  

Hello

 

Can anyone convert mql5 indicator to mql4?

I want to apply bill williams Zone trade indicator in mt4 chart but I can't anyone to convert it for me.

 

Please help me. 

Alain Verleyen
Moderator
33816
Alain Verleyen  
To add comments, please log in or register