addInput()

添加腳本中使用的變量
addInput(name:string, type:string, value:mixed, options:object=null)

Parameters

Name Type Действие Значение по умолчанию
name string 輸入名稱
type string 輸入類型
value mixed 默認值
options object 輸入選項 null

Description

在構造函數中使用。 從程序屬性窗口更改變量值

Example

// 將NBars變量設置為默認值20
this.addInput("NBars", InputType.int, 20);
// 默認情況下,將變量PriceType設置為類型PriceType的值PriceType.Bid
this.addInput("PriceType", InputType.PriceType, PriceType.Bid);