Convert Setting File From MT4 to MT5

Avatar
  • updated

Hello Community,

I have created this script in Powershell that converts a setting file from Metatrader 4 (MT4) to Metatrader 5 (MT5).

Open cmd.exe and execute this

powershell.exe -file ".\Convert_MT4_to_MT5.ps1" CP-EURUSD.set

Convert_MT4_to_MT5.ps1

Avatar
Ulises Cune

New version v1.1

I forgot about these variables

BigCandle_TF
Oscillator2_TF
Oscillator3_TF
IdentifyTrend_TF

MACD_TF
PSar_TF
MA_Filter_1_TF
MA_Filter_2_TF
MA_Filter_3_TF
ZZ_TF
VolMA_TF
VolFilter_TF

Convert_MT4_to_MT5.ps1

Avatar
Ulises Cune

This is an example of execution


New version with "Successfully Converted"
v1.2

Convert_MT4_to_MT5.ps1

Avatar
Ulises Cune

Hello Community.

I have created a version with Window to make it easier to use and to be able to convert multiple files with one click.

Simply drag the files to the window and press the button

GUI Version (v2.1)

Convert-MT4_To_MT5-gui.ps1

Console Version (v1.3)

Convert_MT4_to_MT5.ps1

Avatar
Andrey Khatimlianskyi

Thank you for your great work!

Unfortunately, I can't run the script:

File conv_gui.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at h
ttp://go.microsoft.com/fwlink/?LinkID=135170.
+ CategoryInfo : SecurityError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnauthorizedAccess

I'll try to fix this later.

Avatar
Ulises Cune

Hello Community,

This new version converts the Bool variables, 0 to false and 1 to true from MT4 to MT5, and adds a new IdentifyTrend_AppliedPrice variable.

GUI Version (v2.4)

CommunityPowerEA_Convert-MT4_To_MT5-gui.ps1

Console Version (v1.4)

CommunityPowerEA_Convert_MT4_to_MT5.ps1

Avatar
Paolo Scardia

It's possible to do the reverse: from MT5 to MT4?

Avatar
Ulises Cune
Quote from Paolo Scardia

It's possible to do the reverse: from MT5 to MT4?

Hello Paolo,

Yes, here

https://communitypowerea.userecho.com/en/communities/7/topics/350-convert-setting-file-from-mt5-to-mt4-powershell-script

Avatar
Ulises Cune

New boolean value added

ZZ_Reverse

Tester setting the default value is 0 and the Profile setting value is false. This and all similar values are converted to false for MT5

GUI Version (v2.5)

CommunityPowerEA_Convert-MT4_To_MT5-gui.ps1


Console Version (v1.5)

CommunityPowerEA_Convert_MT4_to_MT5.ps1

Avatar
Ulises Cune

Hello Community,

I have added support for version 2.35 which has the new options

MACD2

DTrend


I leave the repository where you can always find the latest version of this script.

https://github.com/ulises2k/CommunityPowerEA_Convert_MT4_to_MT5

GUI Version (v2.6)

CommunityPowerEA_Convert-MT4_To_MT5-gui.ps1

Console Version (v1.6)

CommunityPowerEA_Convert_MT4_to_MT5.ps1


Avatar
Ulises Cune

New version that supports up to version 2.38

The following options were added:

  • Oscillators_TF
  • AllowHedge
  • Pending_DisableForOpposite
  • GlobalTakeProfit_OnlyLock
  • UseVirtualTP
  • AntiMartingail_AllowTP
  • AllowBothMartinAndAntiMartin
  • PartialCloseHedge_MainToMain
  • PartialCloseHedge_BothWays
  • Oscillators_UseClosedBars
  • Oscillator2_UseClosedBars
  • Oscillator3_UseClosedBars

Console Version:

CommunityPowerEA_Convert_MT4_to_MT5.ps1

Gui Version:

CommunityPowerEA_Convert-MT4_To_MT5-gui.ps1
CommunityPowerEA_Convert-MT4_To_MT5-gui_run.bat