Unfortunately, the different numerical representations of some ENUMs (in particular ENUM_TIMEFRAMES and ENUM_APPLIED_PRICE) are not taken into account.
Hello, your converter does not work on MT5? because I would like to convert my indicator to MT4 but your converter does not work, unless I do not understand how to use it, can you help me, thank you very much
J'ai aimé un indicateur MT5 et je l'ai converti en fichier de jeu MT4 à l'aide de votre script. Mais vous ne savez pas comment utiliser le fichier de jeu MT4 sans le fichier MQL4/ex4.
Comment puis-je charger le fichier de jeu MT4 converti sur le graphique MT4 sans les fichiers MT4/ex4 ?
Est-il possible de convertir le fichier MQL5 en fichier MQL4 ?.
hello, how did you do with this script to convert, because i can't, can you help me?
ENUM_TIMEFRAMES and ENUM_APPLIED_PRICE cannot be taken into account: the set file does not save information about the type - and guessing the type from variable names is not a sensible idea.
This is a fairly common problem and can be circumvented by introducing another type that will be predictably converted in code to a value suitable for the platform.
For example, store an integer value of minutes, and interpret it in MT4 code by a simple conversion, and in MT5 code by a slightly more complex switch
And then there is the problem of incompatible timeframes, which is a separate issue.
I looked into the script code and found out that it does not handle some situations correctly.
For example, if a value contains "equals" signs.
Or if the value is empty (we get "(null)" in the MT4 network)
Fix: Source code style formatted to Google style by ClangFormat. (Apologies. Personal preference.)
FIX: Changed to skip comment lines.
Fix: Don't use Split() for parameter/value extraction so that the '=' in the value is not removed.
Added: change certain parameters to other values. Parameter/value pairs are read from the [ChangeKeyValue] section of the 'SetFileConveter.ini' file.
Added: Change the value of the ENUM_TIMEFRAMES type parameter to a value for MT4. The ENUM_TIMEFRAMES type parameters to be converted are read from the [TimeframeKey] section of the 'SetFileConveter.ini' file.
Additional: Change the value of the ENUM_APPLIED_PRICE type parameter to the value for MT4. The ENUM_APPLIED_PRICE type parameter to be converted is read from the [PriceKey] section of the 'SetFileConveter.ini' file.
The 'SetFileConveter.ini' is placed in 'MQL5/Files'. The contents are described as follows.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
@Richard Gunning, thank you for you script!
Unfortunately, it can't be used with some ENUMs (TIMEFRAME, APPLIED_PRICE) because numerical values differs for MT4 and MT5.
Are you going to fix it?
Thanks again.
J'ai aimé un indicateur MT5 et je l'ai converti en fichier de jeu MT4 à l'aide de votre script. Mais vous ne savez pas comment utiliser le fichier de jeu MT4 sans le fichier MQL4/ex4.
Comment puis-je charger le fichier de jeu MT4 converti sur le graphique MT4 sans les fichiers MT4/ex4 ?
Est-il possible de convertir le fichier MQL5 en fichier MQL4 ?.
ENUM_TIMEFRAMES and ENUM_APPLIED_PRICE cannot be taken into account: the set file does not save information about the type - and guessing the type from variable names is not a sensible idea.
This is a fairly common problem and can be circumvented by introducing another type that will be predictably converted in code to a value suitable for the platform.
For example, store an integer value of minutes, and interpret it in MT4 code by a simple conversion, and in MT5 code by a slightly more complex switch
And then there is the problem of incompatible timeframes, which is a separate issue.
I looked into the script code and found out that it does not handle some situations correctly.
For example, if a value contains "equals" signs.
Or if the value is empty (we get "(null)" in the MT4 network)
Fixed
Script, thank you.
I have changed the following points to use it.
Fix: Source code style formatted to Google style by ClangFormat. (Apologies. Personal preference.)
FIX: Changed to skip comment lines.
Fix: Don't use Split() for parameter/value extraction so that the '=' in the value is not removed.
Added: change certain parameters to other values. Parameter/value pairs are read from the [ChangeKeyValue] section of the 'SetFileConveter.ini' file.
Added: Change the value of the ENUM_TIMEFRAMES type parameter to a value for MT4. The ENUM_TIMEFRAMES type parameters to be converted are read from the [TimeframeKey] section of the 'SetFileConveter.ini' file.
Additional: Change the value of the ENUM_APPLIED_PRICE type parameter to the value for MT4. The ENUM_APPLIED_PRICE type parameter to be converted is read from the [PriceKey] section of the 'SetFileConveter.ini' file.
The 'SetFileConveter.ini' is placed in 'MQL5/Files'. The contents are described as follows.
The modified source code is attached.