Convert Setting File From MT5 to MT4 (Powershell Script)

Avatar
  • updated

Hello Community,
I have created a script in Powershell that converts the .set files from the Metatrader 5 (MT5) version to the Metatrader 4 (MT4) version.
The script is a text file that anyone can modify and adapt to her needs.

They also have the version of converting MT4 to MT5 

Image 1442


Image 1443


Image 1444


CommunityPowerEA_Convert-MT5_To_MT4-gui.ps1

Avatar
Ulises Cune

Hello Jacian,
Not all MT5 timeframes are on MT4.

MT4 Time Frame

Image 3452

MT5 TimeFrame:

Image 3453

MT5 TimeFrame are not in MT4
2 Minutes
3 Minutes
4 Minutes
6 Minutes
10 Minutes
12 Minutes
20 Minutes
2 Hours => 16386
3 Hours => 16387
6 Hours => 16390
8 Hours => 16392
12 Hours => 16396

I am going to improve the script so that it shows that TimeFrame is the one that needs to be corrected.

Avatar
Jacian
Quote from Ulises Cune

Hello Jacian,
Not all MT5 timeframes are on MT4.

MT4 Time Frame

Image 3452

MT5 TimeFrame:

Image 3453

MT5 TimeFrame are not in MT4
2 Minutes
3 Minutes
4 Minutes
6 Minutes
10 Minutes
12 Minutes
20 Minutes
2 Hours => 16386
3 Hours => 16387
6 Hours => 16390
8 Hours => 16392
12 Hours => 16396

I am going to improve the script so that it shows that TimeFrame is the one that needs to be corrected.

I finally got it. I just have to change the TF values to match MT4 manually to convert it successfully. Although I read the script file and it seems like to have a code to convert it automatically unless I didn't understand the code correctly. Thank you for the help.

Avatar
Ulises Cune

New version that supports up to version 2.49.3


This version corrects some errors and also informs which is the Time Frame not supported in MT4


CommunityPowerEA_Convert-MT5_To_MT4-gui.ps1

Avatar
Ulises Cune

New version that supports up to version 2.49 Final Release 


powershell -ExecutionPolicy Bypass -File "CommunityPowerEA_Convert-MT5_To_MT4-gui.ps1"


CommunityPowerEA_Convert-MT5_To_MT4-gui.ps1

Avatar
Jim

Hello,

thanks for your great work! do you have an idea, how i can fix the following error?

Image 3825

thanks, Jim

Avatar
Ulises Cune
Quote from Jim

Hello,

thanks for your great work! do you have an idea, how i can fix the following error?

Image 3825

thanks, Jim

Hello, could you please share the .set file?

Avatar
Ulises Cune

New version that supports up to version 2.50.4 Beta

powershell -ExecutionPolicy Bypass -File "CommunityPowerEA_Convert-MT5_To_MT4-gui.ps1"


CommunityPowerEA_Convert-MT5_To_MT4-gui.ps1

Avatar
Samuel Nguyen

Hi @Ulises, may I check if there is any latest version for new CP releases?

Thanks.

Avatar

need update 2.52.2 please .....