Identifier redeclared

There are several differences in syntax of variables usage between MQL4 and ActFX languages.

 

hmtoggle_plus1ActFX does not distinguish between upper case and lower case letters

Example:

Var Amount: Double = 1.3;

      AMOUNT: integer;

 

If variable Amount is declared as Double, then AMOUNT variable cannot be declared.

converter_err5

Solution:

Rename one of the variables, for example add index or prefix: var Amount_1: integer;

 

hmtoggle_plus1ActFX does not allow using variables (constants) or functions (procedures) names which are similar to ActFX (standard) functions names or global variables/constants

Example:

var Repeat: Integer = 3;

 

The Strategy Editor in such situation will return the error: ‘Begin’ expected or Identifier redeclared

converter_err6

Solution:

Rename one of the variables, for example add index or prefix: var MyRepeat_1: integer;

 

Any standard command, operator or function name cannot be used as a variable.

Note: All ActFX functions are marked with bold blue highlight in the Strategy Editor:

List of the most common variables names used in MQL4 but not supported in ActFX:

Begin
CloseTrader
Date
Label
Log
Max
Min
Mod
OnNewCandle
Repeat
ShowMessage
StrToColor
Time
Try
Type

 

hmtoggle_plus1ActFX does not allow using variables (constants) or functions (procedures) names which are similar to MQL functions names or global variables/constants

Example:

var day: Integer;

converter_err7

Solution:

Rename one of the variables, for example add index or prefix: var MyDay: integer;

 

List of the most common variables names:

Ask
Bars
Close
Comment
Day
ErrorDescription
High
ObjectCreate
Open
OrderExpiration
OrderType
Period
Point
Symbol
Volume

 

hmtoggle_plus1ActFX does not allow using variables (constants) which are similar to custom functions (procedures) names or global variables/constants

ActFX does not allow using variables (constants) which are similar to custom functions (procedures) names or global variables/constants

Example:

var buy: Boolean = false;

….

procedure buy;

converter_err8

Solution:

Rename one of the variables, for example add index or prefix: var buy_permission: Boolean = false;
Show/Hide Hidden Text