input
Functions
bool
input.bool(
defval: const bool,
title: const string = na,
tooltip: const string = na,
inline: const string = na,
group: const string = na,
confirm: const bool = false,
display: const PlotDisplay = display.ALL,
active: input bool = true
): input boolCreates an input value exposed in the script settings UI.
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 PlotDisplay | display.ALL | The display mode for the input. |
active | input bool | true | If true, the input is active. |
Returns: input bool
color
input.color(
defval: const color,
title: const string = na,
tooltip: const string = na,
inline: const string = na,
group: const string = na,
confirm: const bool = false,
display: const PlotDisplay = display.ALL,
active: input bool = true
): input colorCreates an input value exposed in the script settings UI.
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 PlotDisplay | display.ALL | The display mode for the input. |
active | input bool | true | If true, the input is active. |
Returns: input color
enum
input.enum(
defval: const T,
title: const string = na,
options: const Array<T> = na,
tooltip: const string = na,
inline: const string = na,
group: const string = na,
confirm: const bool = false,
display: const PlotDisplay = display.ALL,
active: input bool = true
): input TCreates an input value exposed in the script settings UI.
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 PlotDisplay | display.ALL | The display mode for the input. |
active | input bool | true | If true, the input is active. |
Returns: input T
float
Creates an input value exposed in the script settings UI.
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 PlotDisplay | display.ALL | The display mode for the input. |
active | input bool | true | If true, the input is active. |
Returns: input float
int
Creates an input value exposed in the script settings UI.
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 PlotDisplay | display.ALL | The display mode for the input. |
active | input bool | true | If true, the input is active. |
Returns: input int
price
input.price(
defval: const float,
title: const string = na,
tooltip: const string = na,
inline: const string = na,
group: const string = na,
confirm: const bool = false,
display: const PlotDisplay = display.ALL,
active: input bool = true
): input floatCreates an input value exposed in the script settings UI.
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 PlotDisplay | display.ALL | The display mode for the input. |
active | input bool | true | If true, the input is active. |
Returns: input float
session
input.session(
defval: const string,
title: const string = na,
options: const Array<string> = na,
tooltip: const string = na,
inline: const string = na,
group: const string = na,
confirm: const bool = false,
display: const PlotDisplay = display.ALL,
active: input bool = true
): input stringCreates an input value exposed in the script settings UI.
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 PlotDisplay | display.ALL | The display mode for the input. |
active | input bool | true | If true, the input is active. |
Returns: input string
source
input.source(
defval: const expression,
title: const string = na,
tooltip: const string = na,
inline: const string = na,
group: const string = na,
display: const PlotDisplay = display.ALL,
active: input bool = true,
confirm: const bool = false
): input floatCreates an input value exposed in the script settings UI.
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 PlotDisplay | 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(
defval: const string,
title: const string = na,
options: const Array<string> = na,
tooltip: const string = na,
inline: const string = na,
group: const string = na,
confirm: const bool = false,
display: const PlotDisplay = display.ALL,
active: input bool = true
): input stringCreates an input value exposed in the script settings UI.
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 PlotDisplay | display.ALL | The display mode for the input. |
active | input bool | true | If true, the input is active. |
Returns: input string
symbol
input.symbol(
defval: const string,
title: const string = na,
tooltip: const string = na,
inline: const string = na,
group: const string = na,
confirm: const bool = false,
display: const PlotDisplay = display.ALL,
active: input bool = true
): input stringCreates an input value exposed in the script settings UI.
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 PlotDisplay | 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(
defval: const string,
title: const string = na,
tooltip: const string = na,
group: const string = na,
confirm: const bool = false,
display: const PlotDisplay = display.ALL,
active: input bool = true
): input stringCreates an input value exposed in the script settings UI.
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 PlotDisplay | display.ALL | The display mode for the input. |
active | input bool | true | If true, the input is active. |
Returns: input string
time
input.time(
defval: const int,
title: const string = na,
tooltip: const string = na,
inline: const string = na,
group: const string = na,
confirm: const bool = false,
display: const PlotDisplay = display.ALL,
active: input bool = true
): input intCreates an input value exposed in the script settings UI.
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 PlotDisplay | display.ALL | The display mode for the input. |
active | input bool | true | If true, the input is active. |
Returns: input int
timeframe
input.timeframe(
defval: const string,
title: const string = na,
options: const Array<string> = na,
tooltip: const string = na,
inline: const string = na,
group: const string = na,
confirm: const bool = false,
display: const PlotDisplay = display.ALL,
active: input bool = true
): input stringCreates an input value exposed in the script settings UI.
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 PlotDisplay | display.ALL | The display mode for the input. |
active | input bool | true | If true, the input is active. |
Returns: input string