Adds variables used in the script
addInput(name:string, type:string, value:mixed, options:object=null)
Parameters
Name |
Type |
Действие |
Значение по умолчанию |
name |
string |
Name of the input |
— |
type |
string |
Type of the input |
— |
value |
mixed |
Default value |
— |
options |
object |
Options for the input |
null |
Description
Used in the constructor. Variable values are changed from the program properties window
Example
// set the NBars variable with a default value of 20
this.addInput("NBars", InputType.int, 20);
// set the variable PriceType with a value of type PriceType by default PriceType.Bid
this.addInput("PriceType", InputType.PriceType, PriceType.Bid);