A variable is a name that is used to represent a stored value, including values calculated by formulas.  This value can be a number, true/false condition, or a string.  Users can either declare their own variable names or use pre-declared names (Value1-99 and Condition1-99).

Pre-Declared Variables

The reserved words Value1-99 and Condition1-99 are already defined in EasyLanguage and may be used to store values in calculations.  The pre-declared ValueN word is used to store numeric values while ConditionN is used to store a true/false value.

note_icon.png   EasyLanguage provides you with 100 pre-declared numerical variables (Value0 through Value 99) and 100 pre-declared true/false variables (Condition0 through Condition99).

Value1 = Minlist(Close,Open);

Condition1 = Close > High ;

User-Declared Variables

User-declared variable names are specified using the Variable reserved word.  The initial value must be specified in parenthesis following the name and is used to determine the base type of the variable  (numeric, true/false, string).  In addition, an optional explicit data type (float, double, int, bool, string) may be included in front of the variable name declaration.

note_icon.png   When using a variable that is not pre-declared, you must include a variable declaration statement as illustrated in the first line of code below.

Variables: Min(0), Max(0);


Min = Minlist(Close,Open);

Max = Maxlist(Close,Open);