Skip to content

input

Functions

bool

navi
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 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 PlotDisplaydisplay.ALLThe display mode for the input.
activeinput booltrueIf true, the input is active.

Returns: input bool


color

navi
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 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 PlotDisplaydisplay.ALLThe display mode for the input.
activeinput booltrueIf true, the input is active.

Returns: input color


enum

navi
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 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 PlotDisplaydisplay.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 PlotDisplaydisplay.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 PlotDisplaydisplay.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 PlotDisplaydisplay.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 PlotDisplaydisplay.ALLThe display mode for the input.
activeinput booltrueIf true, the input is active.

Returns: input int


price

navi
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 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 PlotDisplaydisplay.ALLThe display mode for the input.
activeinput booltrueIf true, the input is active.

Returns: input float


session

navi
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 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 PlotDisplaydisplay.ALLThe display mode for the input.
activeinput booltrueIf true, the input is active.

Returns: input string


source

navi
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 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 PlotDisplaydisplay.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
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 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 PlotDisplaydisplay.ALLThe display mode for the input.
activeinput booltrueIf true, the input is active.

Returns: input string


symbol

navi
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 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 PlotDisplaydisplay.ALLThe display mode for the input.
activeinput booltrueIf true, the input is active.

Returns: input string


text_area

navi
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 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 PlotDisplaydisplay.ALLThe display mode for the input.
activeinput booltrueIf true, the input is active.

Returns: input string


time

navi
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 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 PlotDisplaydisplay.ALLThe display mode for the input.
activeinput booltrueIf true, the input is active.

Returns: input int


timeframe

navi
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 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 PlotDisplaydisplay.ALLThe display mode for the input.
activeinput booltrueIf true, the input is active.

Returns: input string

Released under the MIT License.