MT4 to MT5 code converter

 

Rewrite MQL 4 to MQL 5 Script

A script which converts MQL 4 code to MQL 5 code was developed by Keiji and Circlesquares on the MQL4 forum.

First, download the following files and place them in your Metatrader 4 / experts / include folder

- mt4accountinfo.mqh

- mt4string.mqh

- mt4datetime.mqh

- mt4objects_1.mqh

- mt4timeseries_2.mqh

Now, place the latest version of the rewrite script and it in your Metatrader 4 / experts / scripts folder:

- mq4to5rewrite_sample_v4_2.mq4

After that you will need to place a mql4 indicator, script or ea which you want to convert to MQL 5 in your Metatrader 4 / experts / files folder. Now open Metatrader 4 and run the script, the script is located in the navigator window. As you can see you must first provide the exactly name (without extension) of your mq4 file and select if it is an indicator (0), EA (1) or script (2) file.

Now hit the "OK" button and if everything is done

After that go to your Metatrader 4 / experts / files folder and you will find the converted mq5 file there:

Now open this file with Metaeditor 5 in compile it.

Try to fix the errors with the MQL4 to MQL5 Porting Table and the last version of the translated MQL5 user guide.

All the required files is included in the ZIP

Files:
 

Wow, this is gonna be really useful when MT5 becomes mainstream.

Thanks.

 

Thanks TT it quiet helpful ...will try it soon

 

Thanks.I will try it.

 

Hi,

How can I install custom indicators in MT5? I downloaded an indicator from the codebase, but I do not know in which directory should I copy it. I tried to copy it in MQL5/Indicators but it does not show. Thank you.

 

wow

since i heard mt5 uses different language with mt4,i feel so weak in trading....it is like bad dream comes true....and now i find this converter... i hope it is working...thanks for sharing...i now it is just beginning, hope u will be sharing another tools in this isue

 
profitrader21:
Hi, How can I install custom indicators in MT5? I downloaded an indicator from the codebase, but I do not know in which directory should I copy it. I tried to copy it in MQL5/Indicators but it does not show. Thank you.

Have you tried to put the EX5 file in Examples directory?

 

this tool need much more improvements

After testing this converter, i think that it needs much more improvements, since the converted file still has too many code errors.

 

ho..ho.ho..

josemarcoss:
After testing this converter, i think that it needs much more improvements, since the converted file still has too many code errors.

u are right, it is just beginning....hope another tools come soon

 

first step to mql5

thank you for the tool, however a way is discovered to transform the mq4 indi to mq5. wanna test it now. . hope to see an improvement later.

 

Does anyone have a newer version of this script?

Reason: