Skip to content

input ​

Functions ​

bool ​

navi
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 = PlotDisplay.ALL,
    active: input bool = true
  ): input bool

Creates an input value exposed in the script settings UI.

Parameters

NameTypeDefaultDescription
defvalconst boolThe default value of the input.
titleconst StringnaThe label for the input in the settings.
tooltipconst StringnaThe tooltip text for the input.
inlineconst StringnaThe inline group name for layout.
groupconst StringnaThe input group name for organization.
confirmconst boolfalseIf true, a confirmation dialog is shown.
displayconst PlotDisplayPlotDisplay.ALLThe display mode for the input.
activeinput booltrueIf true, the input is active.

Returns: input bool


color ​

navi
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 = PlotDisplay.ALL,
    active: input bool = true
  ): input Color

Creates an input value exposed in the script settings UI.

Parameters

NameTypeDefaultDescription
defvalconst ColorThe default color value of the input.
titleconst StringnaThe label for the input in the settings.
tooltipconst StringnaThe tooltip text for the input.
inlineconst StringnaThe inline group name for layout.
groupconst StringnaThe input group name for organization.
confirmconst boolfalseIf true, a confirmation dialog is shown.
displayconst PlotDisplayPlotDisplay.ALLThe display mode for the input.
activeinput booltrueIf true, the input is active.

Returns: input Color


enum ​

navi
enum<T>(
    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 = PlotDisplay.ALL,
    active: input bool = true
  ): input T

Creates an input value exposed in the script settings UI.

Parameters

NameTypeDefaultDescription
defvalconst TThe default enum value of the input.
titleconst StringnaThe label for the input in the settings.
optionsconst Array<T>naAn array of allowed enum values.
tooltipconst StringnaThe tooltip text for the input.
inlineconst StringnaThe inline group name for layout.
groupconst StringnaThe input group name for organization.
confirmconst boolfalseIf true, a confirmation dialog is shown.
displayconst PlotDisplayPlotDisplay.ALLThe display mode for the input.
activeinput booltrueIf true, the input is active.

Returns: input T


float ​

Creates an input value exposed in the script settings UI.

Parameters

NameTypeDefaultDescription
defvalconst floatThe default value of the input.
titleconst StringnaThe label for the input in the settings.
optionsconst Array<float>naAn array of allowed values for the input.
tooltipconst StringnaThe tooltip text for the input.
inlineconst StringnaThe inline group name for layout.
groupconst StringnaThe input group name for organization.
confirmconst boolfalseIf true, a confirmation dialog is shown.
displayconst PlotDisplayPlotDisplay.ALLThe display mode for the input.
activeinput booltrueIf true, the input is active.

Returns: input float

Creates an input value exposed in the script settings UI.

Parameters

NameTypeDefaultDescription
defvalconst floatThe default value of the input.
titleconst StringnaThe label for the input in the settings.
minvalconst floatnaThe minimum allowed value.
maxvalconst floatnaThe maximum allowed value.
stepconst floatnaThe step size for value increments.
tooltipconst StringnaThe tooltip text for the input.
inlineconst StringnaThe inline group name for layout.
groupconst StringnaThe input group name for organization.
confirmconst boolfalseIf true, a confirmation dialog is shown.
displayconst PlotDisplayPlotDisplay.ALLThe display mode for the input.
activeinput booltrueIf true, the input is active.

Returns: input float


int ​

Creates an input value exposed in the script settings UI.

Parameters

NameTypeDefaultDescription
defvalconst intThe default value of the input.
titleconst StringnaThe label for the input in the settings.
optionsconst Array<int>naAn array of allowed values for the input.
tooltipconst StringnaThe tooltip text for the input.
inlineconst StringnaThe inline group name for layout.
groupconst StringnaThe input group name for organization.
confirmconst boolfalseIf true, a confirmation dialog is shown.
displayconst PlotDisplayPlotDisplay.ALLThe display mode for the input.
activeinput booltrueIf true, the input is active.

Returns: input int

Creates an input value exposed in the script settings UI.

Parameters

NameTypeDefaultDescription
defvalconst intThe default value of the input.
titleconst StringnaThe label for the input in the settings.
minvalconst intnaThe minimum allowed value.
maxvalconst intnaThe maximum allowed value.
stepconst intnaThe step size for value increments.
tooltipconst StringnaThe tooltip text for the input.
inlineconst StringnaThe inline group name for layout.
groupconst StringnaThe input group name for organization.
confirmconst boolfalseIf true, a confirmation dialog is shown.
displayconst PlotDisplayPlotDisplay.ALLThe display mode for the input.
activeinput booltrueIf true, the input is active.

Returns: input int


price ​

navi
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 = PlotDisplay.ALL,
    active: input bool = true
  ): input float

Creates an input value exposed in the script settings UI.

Parameters

NameTypeDefaultDescription
defvalconst floatThe default price value of the input.
titleconst StringnaThe label for the input in the settings.
tooltipconst StringnaThe tooltip text for the input.
inlineconst StringnaThe inline group name for layout.
groupconst StringnaThe input group name for organization.
confirmconst boolfalseIf true, a confirmation dialog is shown.
displayconst PlotDisplayPlotDisplay.ALLThe display mode for the input.
activeinput booltrueIf true, the input is active.

Returns: input float


session ​

navi
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 = PlotDisplay.ALL,
    active: input bool = true
  ): input String

Creates an input value exposed in the script settings UI.

Parameters

NameTypeDefaultDescription
defvalconst StringThe default session value of the input.
titleconst StringnaThe label for the input in the settings.
optionsconst Array<String>naAn array of allowed session values.
tooltipconst StringnaThe tooltip text for the input.
inlineconst StringnaThe inline group name for layout.
groupconst StringnaThe input group name for organization.
confirmconst boolfalseIf true, a confirmation dialog is shown.
displayconst PlotDisplayPlotDisplay.ALLThe display mode for the input.
activeinput booltrueIf true, the input is active.

Returns: input String


source ​

navi
source(
    defval: const expression,
    title: const String = na,
    tooltip: const String = na,
    inline: const String = na,
    group: const String = na,
    display: const PlotDisplay = PlotDisplay.ALL,
    active: input bool = true,
    confirm: const bool = false
  ): input float

Creates an input value exposed in the script settings UI.

Parameters

NameTypeDefaultDescription
defvalconst expressionThe default series expression value of the input.
titleconst StringnaThe label for the input in the settings.
tooltipconst StringnaThe tooltip text for the input.
inlineconst StringnaThe inline group name for layout.
groupconst StringnaThe input group name for organization.
displayconst PlotDisplayPlotDisplay.ALLThe display mode for the input.
activeinput booltrueIf true, the input is active.
confirmconst boolfalseIf true, a confirmation dialog is shown.

Returns: input float


string ​

navi
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 = PlotDisplay.ALL,
    active: input bool = true
  ): input String

Creates an input value exposed in the script settings UI.

Parameters

NameTypeDefaultDescription
defvalconst StringThe default String value of the input.
titleconst StringnaThe label for the input in the settings.
optionsconst Array<String>naAn array of allowed values for the input.
tooltipconst StringnaThe tooltip text for the input.
inlineconst StringnaThe inline group name for layout.
groupconst StringnaThe input group name for organization.
confirmconst boolfalseIf true, a confirmation dialog is shown.
displayconst PlotDisplayPlotDisplay.ALLThe display mode for the input.
activeinput booltrueIf true, the input is active.

Returns: input String


symbol ​

navi
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 = PlotDisplay.ALL,
    active: input bool = true
  ): input String

Creates an input value exposed in the script settings UI.

Parameters

NameTypeDefaultDescription
defvalconst StringThe default symbol value of the input.
titleconst StringnaThe label for the input in the settings.
tooltipconst StringnaThe tooltip text for the input.
inlineconst StringnaThe inline group name for layout.
groupconst StringnaThe input group name for organization.
confirmconst boolfalseIf true, a confirmation dialog is shown.
displayconst PlotDisplayPlotDisplay.ALLThe display mode for the input.
activeinput booltrueIf true, the input is active.

Returns: input String


text_area ​

navi
text_area(
    defval: const String,
    title: const String = na,
    tooltip: const String = na,
    group: const String = na,
    confirm: const bool = false,
    display: const PlotDisplay = PlotDisplay.ALL,
    active: input bool = true
  ): input String

Creates an input value exposed in the script settings UI.

Parameters

NameTypeDefaultDescription
defvalconst StringThe default text value of the input.
titleconst StringnaThe label for the input in the settings.
tooltipconst StringnaThe tooltip text for the input.
groupconst StringnaThe input group name for organization.
confirmconst boolfalseIf true, a confirmation dialog is shown.
displayconst PlotDisplayPlotDisplay.ALLThe display mode for the input.
activeinput booltrueIf true, the input is active.

Returns: input String


time ​

navi
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 = PlotDisplay.ALL,
    active: input bool = true
  ): input int

Creates an input value exposed in the script settings UI.

Parameters

NameTypeDefaultDescription
defvalconst intThe default time value of the input as UNIX timestamp.
titleconst StringnaThe label for the input in the settings.
tooltipconst StringnaThe tooltip text for the input.
inlineconst StringnaThe inline group name for layout.
groupconst StringnaThe input group name for organization.
confirmconst boolfalseIf true, a confirmation dialog is shown.
displayconst PlotDisplayPlotDisplay.ALLThe display mode for the input.
activeinput booltrueIf true, the input is active.

Returns: input int


timeframe ​

navi
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 = PlotDisplay.ALL,
    active: input bool = true
  ): input String

Creates an input value exposed in the script settings UI.

Parameters

NameTypeDefaultDescription
defvalconst StringThe default timeframe value of the input.
titleconst StringnaThe label for the input in the settings.
optionsconst Array<String>naAn array of allowed timeframe values.
tooltipconst StringnaThe tooltip text for the input.
inlineconst StringnaThe inline group name for layout.
groupconst StringnaThe input group name for organization.
confirmconst boolfalseIf true, a confirmation dialog is shown.
displayconst PlotDisplayPlotDisplay.ALLThe display mode for the input.
activeinput booltrueIf true, the input is active.

Returns: input String