You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
@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.