MQL4->ActFX converter

The MQL4->ActFX converter can be used in ActFX for converting MQL4 expert advisers into ActFX strategies.

 

“MQL4->ActFX converter” allows to convert open-source Expert Advisers (“*.mq4” files) and MQL libraries (“*.mqh” files). Converter automatically recognizes the file extension and corrects the output file.

 

The functionality is easy to use.

To convert an MQL4 Expert Adviser, click the “MQL4->ActFX converter” button located in FXVoyager->ActFX tab and in the Scripts Editor panel:

 

4_6_rns124_new

The Open dialog window will appear where you can select an MQL4 expert adviser:

 

4_6_rns125_new

 

If selected (*.mq4) script has errors and cannot be converted to the ActFX language for any reason, you will be notified with the corresponding message. This message consists of the error type and row/column index of this error in the source script.

 

If script is converted correctly, it will be automatically opened in the Strategy Editor.

After that you need to compile the script using “Compile” or “Compile and add” buttons

 

4_6_rns126_new

If the script contains a custom library, then this library should be converted separately:

 

MQL_convert 3

To convert an MQL4 library, click the “MQL4->ActFX converter” button located in FXVoyager->ActFX tab and in the Scripts Editor panel and select corresponding (*.mqh) library file in open dialog window:

 

MQL_convert

If selected library has errors and cannot be converted to the ActFX language for any reason, you will be notified with the corresponding message. This message consists of the error type and row/column index of this error in the source script.

 

If library is converted correctly, it will be automatically opened in the Strategy Editor.

 

MQL_convert 2

NOTE: The library can be compiled but it shouldn’t be “run”. It is automatically used in main script (“easyLMA_v6MM.acts” Strategy in example above).

A simple example of external ActFX libraries can be found here.

 

After compiling a script ActFX compiler will notify you if converted (ActFX) code needs to be manually corrected (There are any Incompatible types, Syntax errors etc. - read more).

 

After script is compiled and added to the “Indicators and Strategies”  (by clicking on the “compile and add” button), you can run it in real or test mode using the corresponding buttons.

 

NOTE: Unlike the manually created ActFX strategies, the strategies converted from MQL4 language do not show indicators on the Strategy’s chart, but use only their values (same logic is used in mql4 expert advisers).

 

After strategy is started you can monitor the strategy activity in the corresponding tabs: Open positions/Orders/Closed Positions/Statistics/Log

 

4_6_RNs130