• Обзор
  • Отзывы
  • Обсуждение (4)
  • Что нового

BRiCK Convert4To5 MT4 Free

* Based on this product "BRiCK Convert4To5 MT5 Free" was created.

"Convert4To5" is a Script that converts MQL4 source files into MQL5 source files.
Experts, Indicators, Scripts, and Libraries with extension ".mq4" will be available for MT5.




1. Open the following folder.
    terminal_data_folder\MQL4\Files\ (in the terminal menu select to view "File" - "Open the data directory")

2. Confirm that the BRiCK_Convert4To5 folder exists.
    If it does not exist, insert a script "BRiCK_Convert4To5" into an arbitrary chart and create a folder.

3. Place the source file whose extension is ".mq4" in the Input folder under the BRiCK_Convert4To5 folder.

4. Insert the script "BRiCK_Convert4To5" in an arbitrary chart.

5. Open the Output folder under the BRiCK_Convert4To5 folder and check that the file with the extension ".mq5" has been created.

6. Compile the created MQL5 source file with a MetaEditor.

7. Make sure that it compiles normally. Please correct yourself if an error occurs.

8. Test that it will be the expected movement.

Confirmation environment

Version: 4.00
Build: 1170
Server: Axiory Global Ltd.

Version: 5.00
Build: 1978
Server: MetaQuotes Software Corp.
Account: Hedge


- The difference between the product version and the free version is as follows.

BRiCK Convert4To5    BRiCK Convert4To5 Free
 Price10 USD 0 USD
 Custom Indicator Functions Available Unavailable
 Technical Indicator Functions Available Unavailable
 Trade Functions Available Unavailable
 Watermark None Exist
 Sales of converted files Allowed Not allowed

- This product does not guarantee perfect conversion.

  I have released it since testing the conversion, but it may not be able to convert properly depending on how you write the source code.

- You can not refund or return items. Please confirm with the free version in advance.

- Direct or indirect loss due to using the product is not guaranteed.

- It may not be converted as expected due to differences in terminal version or build.



- Multiple files can not be converted at the same time. Place only one file in the Input folder.

- It is necessary to match the data type defined by the function with the data type of the argument when calling the function.

- Conversion of include files with the extension ".mqh" is not supported. Paste the code into a file of ".mq4" format and convert it.

- The conversion logic assumes the MQL4 source file created after build 940.

- Event functions init, deinit, start are deprecated. It is necessary to describe the main process to OnTick for experts, OnCalculate for indicators, OnStart scripts.
  Refer to the reference for the transition from MQL4 to MQL5.

- Be sure to use "#property strict" before conversion of MQL4 source file to make sure there are no potential compile errors.

#property strict

void OnInit()
   Print("Hello BRiCK");

- The following functions can not be migrated because there is no corresponding function in MQL5.
  Returns a constant value to prevent compile errors.

Function nameReturn value
 AccountFreeMarginMode -1
 FileOpenHistory -1
 HideTestIndicators -
 iBandsOnArray -1
 iCCIOnArray -1
 iEnvelopesOnArray -1
 iMAOnArray -1
 iMomentumOnArray -1
 IndicatorBuffers false
 IndicatorCounted -1
 iRSIOnArray -1
 iStdDevOnArray -1
 MQLSetInteger -
 OrderPrint -
 RefreshRates false

- Since the following functions result in override errors, they are replaced and output.

Function nameFunction name after replacement
 FileReadDouble FileReadDouble_MQL4
 StringTrimLeft StringTrimLeft_MQL4
 StringTrimRight StringTrimRight_MQL4
 StringConcatenate StringConcatenate_MQL4
 iCustom iCustom_MQL4
 ArraySort ArraySort_MQL4
 OrdersTotal OrdersTotal_MQL4

- Since it is not implemented with variable length arguments, the number of arguments is limited for the following functions.

Function nameUpper bound of variable length argument
 StringConcatenate 9
 iCustom (iCustom_MQL4) 9

- In MQL5, when the OrderSend function fails, I added "GetLastError_Trade()" because I do not know details with "GetLastError ()" alone.
  Please refer here for the return value.

Нет отзывов
Версия 1.25 2019.02.06
- Conversion waiting time obsolete
- Disable Custom Indicator Functions
- Disable Technical Indicator Functions
Версия 1.24 2019.01.30
- Disable Trade Function
Версия 1.23 2019.01.16
- Display property window when inserting script into chart
- Trade function corresponded to netting and hedging
- Added processing to return ticket number of standby order with OrderSend
- Modified the return value of OrdersTotal to match MQL4
- Modified potential override error in ArraySort
- Writed the function for migration in the footer part
Версия 1.22 2019.01.09
- Modified runtime errors of predefined variable
- Modified runtime errors of OrderSend and OrderClose
- Modified return value of OrderSend
Версия 1.21 2018.12.29
- MarketInfo return value correction
- Addition of ENUM_SYMBOL_CALC_MODE conversion function
- Unification of versions
Версия 1.12 2018.12.28
- Fix upper limit of variable length argument to 9
- Fix iCustum function name
- Corrected garbled characters when converting files
Версия 1.11 2018.12.27
- Add MQL4 constant not defined in MQL5
Версия 1.10 2018.12.26
- Fixed as overloading of MQL4 function
- Fix overriding MQL4 function
- Added function to enable predefined variables
- Overall fix for the release of MT5 version