input
Functions
bool
input.bool(
const bool defval,
const string title = na,
const string tooltip = na,
const string inline = na,
const string group = na,
const bool confirm = false,
const plot_display display = display.all,
input bool active = true
) → input boolAdd an input to the script settings.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
defval | const bool | The default value of the input. | |
title | const string | na | The label for the input in the settings. |
tooltip | const string | na | The tooltip text for the input. |
inline | const string | na | The inline group name for layout. |
group | const string | na | The input group name for organization. |
confirm | const bool | false | If true, a confirmation dialog is shown. |
display | const plot_display | display.all | The display mode for the input. |
active | input bool | true | If true, the input is active. |
Returns: input bool
color
input.color(
const color defval,
const string title = na,
const string tooltip = na,
const string inline = na,
const string group = na,
const bool confirm = false,
const plot_display display = display.all,
input bool active = true
) → input colorAdd an input to the script settings.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
defval | const color | The default color value of the input. | |
title | const string | na | The label for the input in the settings. |
tooltip | const string | na | The tooltip text for the input. |
inline | const string | na | The inline group name for layout. |
group | const string | na | The input group name for organization. |
confirm | const bool | false | If true, a confirmation dialog is shown. |
display | const plot_display | display.all | The display mode for the input. |
active | input bool | true | If true, the input is active. |
Returns: input color
enum
input.enum(
const T defval,
const string title = na,
const array<T> options = na,
const string tooltip = na,
const string inline = na,
const string group = na,
const bool confirm = false,
const plot_display display = display.all,
input bool active = true
) → input TAdd an input to the script settings.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
defval | const T | The default enum value of the input. | |
title | const string | na | The label for the input in the settings. |
options | const array<T> | na | An array of allowed enum values. |
tooltip | const string | na | The tooltip text for the input. |
inline | const string | na | The inline group name for layout. |
group | const string | na | The input group name for organization. |
confirm | const bool | false | If true, a confirmation dialog is shown. |
display | const plot_display | display.all | The display mode for the input. |
active | input bool | true | If true, the input is active. |
Returns: input T
float
Add an input to the script settings.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
defval | const float | The default value of the input. | |
title | const string | na | The label for the input in the settings. |
options | const array<float> | na | An array of allowed values for the input. |
tooltip | const string | na | The tooltip text for the input. |
inline | const string | na | The inline group name for layout. |
group | const string | na | The input group name for organization. |
confirm | const bool | false | If true, a confirmation dialog is shown. |
display | const plot_display | display.all | The display mode for the input. |
active | input bool | true | If true, the input is active. |
Returns: input float
int
Add an input to the script settings.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
defval | const int | The default value of the input. | |
title | const string | na | The label for the input in the settings. |
options | const array<int> | na | An array of allowed values for the input. |
tooltip | const string | na | The tooltip text for the input. |
inline | const string | na | The inline group name for layout. |
group | const string | na | The input group name for organization. |
confirm | const bool | false | If true, a confirmation dialog is shown. |
display | const plot_display | display.all | The display mode for the input. |
active | input bool | true | If true, the input is active. |
Returns: input int
price
input.price(
const float defval,
const string title = na,
const string tooltip = na,
const string inline = na,
const string group = na,
const bool confirm = false,
const plot_display display = display.all,
input bool active = true
) → input floatAdd an input to the script settings.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
defval | const float | The default price value of the input. | |
title | const string | na | The label for the input in the settings. |
tooltip | const string | na | The tooltip text for the input. |
inline | const string | na | The inline group name for layout. |
group | const string | na | The input group name for organization. |
confirm | const bool | false | If true, a confirmation dialog is shown. |
display | const plot_display | display.all | The display mode for the input. |
active | input bool | true | If true, the input is active. |
Returns: input float
session
input.session(
const string defval,
const string title = na,
const array<string> options = na,
const string tooltip = na,
const string inline = na,
const string group = na,
const bool confirm = false,
const plot_display display = display.all,
input bool active = true
) → input stringAdd an input to the script settings.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
defval | const string | The default session value of the input. | |
title | const string | na | The label for the input in the settings. |
options | const array<string> | na | An array of allowed session values. |
tooltip | const string | na | The tooltip text for the input. |
inline | const string | na | The inline group name for layout. |
group | const string | na | The input group name for organization. |
confirm | const bool | false | If true, a confirmation dialog is shown. |
display | const plot_display | display.all | The display mode for the input. |
active | input bool | true | If true, the input is active. |
Returns: input string
source
input.source(
const expression defval,
const string title = na,
const string tooltip = na,
const string inline = na,
const string group = na,
const plot_display display = display.all,
input bool active = true,
const bool confirm = false
) → input floatAdd an input to the script settings.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
defval | const expression | The default series expression value of the input. | |
title | const string | na | The label for the input in the settings. |
tooltip | const string | na | The tooltip text for the input. |
inline | const string | na | The inline group name for layout. |
group | const string | na | The input group name for organization. |
display | const plot_display | display.all | The display mode for the input. |
active | input bool | true | If true, the input is active. |
confirm | const bool | false | If true, a confirmation dialog is shown. |
Returns: input float
string
input.string(
const string defval,
const string title = na,
const array<string> options = na,
const string tooltip = na,
const string inline = na,
const string group = na,
const bool confirm = false,
const plot_display display = display.all,
input bool active = true
) → input stringAdd an input to the script settings.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
defval | const string | The default string value of the input. | |
title | const string | na | The label for the input in the settings. |
options | const array<string> | na | An array of allowed values for the input. |
tooltip | const string | na | The tooltip text for the input. |
inline | const string | na | The inline group name for layout. |
group | const string | na | The input group name for organization. |
confirm | const bool | false | If true, a confirmation dialog is shown. |
display | const plot_display | display.all | The display mode for the input. |
active | input bool | true | If true, the input is active. |
Returns: input string
symbol
input.symbol(
const string defval,
const string title = na,
const string tooltip = na,
const string inline = na,
const string group = na,
const bool confirm = false,
const plot_display display = display.all,
input bool active = true
) → input stringAdd an input to the script settings.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
defval | const string | The default symbol value of the input. | |
title | const string | na | The label for the input in the settings. |
tooltip | const string | na | The tooltip text for the input. |
inline | const string | na | The inline group name for layout. |
group | const string | na | The input group name for organization. |
confirm | const bool | false | If true, a confirmation dialog is shown. |
display | const plot_display | display.all | The display mode for the input. |
active | input bool | true | If true, the input is active. |
Returns: input string
text_area
input.text_area(
const string defval,
const string title = na,
const string tooltip = na,
const string group = na,
const bool confirm = false,
const plot_display display = display.all,
input bool active = true
) → input stringAdd an input to the script settings.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
defval | const string | The default text value of the input. | |
title | const string | na | The label for the input in the settings. |
tooltip | const string | na | The tooltip text for the input. |
group | const string | na | The input group name for organization. |
confirm | const bool | false | If true, a confirmation dialog is shown. |
display | const plot_display | display.all | The display mode for the input. |
active | input bool | true | If true, the input is active. |
Returns: input string
time
input.time(
const int defval,
const string title = na,
const string tooltip = na,
const string inline = na,
const string group = na,
const bool confirm = false,
const plot_display display = display.all,
input bool active = true
) → input intAdd an input to the script settings.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
defval | const int | The default time value of the input as UNIX timestamp. | |
title | const string | na | The label for the input in the settings. |
tooltip | const string | na | The tooltip text for the input. |
inline | const string | na | The inline group name for layout. |
group | const string | na | The input group name for organization. |
confirm | const bool | false | If true, a confirmation dialog is shown. |
display | const plot_display | display.all | The display mode for the input. |
active | input bool | true | If true, the input is active. |
Returns: input int
timeframe
input.timeframe(
const string defval,
const string title = na,
const array<string> options = na,
const string tooltip = na,
const string inline = na,
const string group = na,
const bool confirm = false,
const plot_display display = display.all,
input bool active = true
) → input stringAdd an input to the script settings.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
defval | const string | The default timeframe value of the input. | |
title | const string | na | The label for the input in the settings. |
options | const array<string> | na | An array of allowed timeframe values. |
tooltip | const string | na | The tooltip text for the input. |
inline | const string | na | The inline group name for layout. |
group | const string | na | The input group name for organization. |
confirm | const bool | false | If true, a confirmation dialog is shown. |
display | const plot_display | display.all | The display mode for the input. |
active | input bool | true | If true, the input is active. |
Returns: input string