Variables
A variable is a name that is used to represent a stored value or an object (an instance of a class). 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.
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. In addition, an optional explicit data type (e.g., float, double, int, bool, string, tsdata.trading.OrdersProvider, elsystem.collections.Vector, tsdata.marketdata.PriceSeriesProvider, tsdata.marketdata.OptionChainProvider) may be included in front of name of the variable.
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);