Inputs (Reserved Word)
Before any names can be used as user-defined inputs, the names to be used must be declared as inputs. The reserved word Inputs is used for declaring one or more inputs. The syntax is:
Inputs:
DataType FirstName(FirstValue) [DisplayName = "OptionalDisplayNameForFirstName", Tooltip = "Optional tooltip text"],
DataType NextName(NextValue) [DisplayName = "OptionalDisplayNameForNextName", Tooltip = "Optional tooltip text for NextName input."];
DataType is an optional specifier of the type of the input (int, double, float, string, or bool).
FirstName and NextName are the names of the inputs to be used, and FirstValue and NextValue are Numeric, True/False or String values used as the default value of each input.
An optional display name, to be used in the Customize Study dialog box, can be provided for each input. If no display name is specified then the input's name is used in the Customize Study dialog.
An optional tooltip, also to be used in the Customize Study dialog box, can be provided for each input. The tooltip will appear in the Customize Study dialog box when the user hovers the mouse over the name of the input.
Remarks
An input name can contain alphanumeric characters, underscores (_), periods (.), dollar signs ($), the "at" symbol (@), and the pound sign (#).
An input name can not start with a number or a period ( . ).
Inputs cannot be assigned values in EasyLanguage code outside the input declaration. Instead, the value of an input is determined by evaluation of the expression used in the input declaration when the EasyLanguage code runs.
The default value of an Input is declared by a number in parenthesis after the input name.
The use of the reserved words Input, and Inputs is identical.
Examples
Inputs: Price(Close), Length(10);
declares the inputs Price and Length, initializing the values to the Close of the bar and ten, respectively.
Inputs: SlowMA(9), FastMA(4);
declares the inputs SlowMA and FastMA, initializing the values to nine and four, respectively.
Inputs: double Price(Close), int Length(10);
declares the inputs Price, as a double-precision floating-point value (Close), and Length, as an integer value (10).
Inputs: int Length(10) [DisplayName = "LengthInBars", Tooltip = "Enter the number of bars over which to calculate."];
declares an integer input, Length, with a default value of 10. The display name of this input is "LengthInBars", and the tooltip for this input is "Enter the number of bars over which to calculate."