MQL4 converter Errors

hmtoggle_plus1Conversion stopped due to timeout.

Example:

 

This error appears if converter stops by timeout. MQL4 source can have a lot of logical operations in one file.

converter_err13

Solution:

Try to divide the MQL4 source into smaller sections.

 

hmtoggle_plus1TXL0127E with TXL0192E: Syntax error at or near >>> ) <<<

Example:

isBuying  =  ();

 

MQL4->ActFX converter does not support empty value assigned to the variable;

converter_err14

Solution:

Replace the empty value with some value, for example “0”: isBuying  =  0;
Replace the empty value with standard Nil value: isBuying  =  Nil

 

hmtoggle_plus1TXL0127E with TXL0192E: Syntax error at or near >>> return <<<

Example:

“Return” parameter out of the main Init() or Start() block

converter_err15

Solution:

All you need to do to solve this problem is include the “return” parameter inside the main block (right before the last brace)

 

hmtoggle_plus1TXL0192E: Syntax error at or near >>> = <<<

Example:

double spread;    spread=Ask-Bid;

 

Unlike MQL4 language, ActFX does not support the initialization of global variable as expression by default.

converter_err16

Solution:

Move the expression into start() function: int start(){spread=Ask-Bid; … }
Modify the expression to use direct initialization: double spread =Ask-Bid;

 

hmtoggle_plus1TXL0192E: Syntax error at or near >>> do <<<

Example:

double do;

 

ActFX is based on Delphi (Pascal) language, that is why some names are recognized as standard procedures. Some of them cannot be passed even through converter, other will be identified during compilation (please see “ActFX does not allow using variables (constants) or functions (procedures) names which are similar to ActFX (standard) functions names or global variables/constants” section)

converter_err17

Solution:

Rename the variable in MQL4 source code, for example add index or prefix: double do_1;

 

List of the variables names which usage is restricted in ActFX:

Auto
Break
Case
Const
Continue
Default
Do
Double
Else
Enum
Extern
Float
For
Goto
If
Int
Register
Return
Signed
Sizeof
Static
Struct
Switch
Typedef
Union
Unsigned
Void
While
Show/Hide Hidden Text