FlowscopeDocs

input reference

Parameters the trader edits in the script settings.

Declare inputs at top level with input name = input.int(...) or in a grouped input ( ... ) block. Values are fixed for a run; changing one in the settings re-runs the script over the loaded history. input.group, input.section and input.tab organise long settings.

Functions

input.bool

Flowscope Script
input.bool(default: bool, title: string = "", key: string? = null, description: string? = null, sameLine: bool = false, required: bool = false, when: bool = true) -> bool

Adds a true-or-false input to the script settings.

default sets the starting value. The result is never null.

  • title labels the control; key identifies it in saved settings.
  • description adds help text.
  • sameLine places the control on the same line as the previous control.
  • required marks the control as required.
  • when hides the control when false.

Optional settings can be left out. The value stays fixed during each run. Changing it applies the new settings and may recalculate history.

ParameterType
defaultbool
titlestring
keystring?
descriptionstring?
sameLinebool
requiredbool
whenbool

Returns bool

Available in Setup only: declarations, setup and state initialisers.

input.color

Flowscope Script
input.color(default: color, title: string = "", key: string? = null, description: string? = null, sameLine: bool = false, required: bool = false, when: bool = true) -> color

Adds a color picker to the script settings.

default sets the starting color. The result is never null.

  • title labels the control; key identifies it in saved settings.
  • description adds help text.
  • sameLine places the control on the same line as the previous control.
  • required marks the control as required.
  • when hides the control when false.

Optional settings can be left out. The value stays fixed during each run. Changing it applies the new settings and may recalculate history.

ParameterType
defaultcolor
titlestring
keystring?
descriptionstring?
sameLinebool
requiredbool
whenbool

Returns color

Available in Setup only: declarations, setup and state initialisers.

input.exchange

Flowscope Script
input.exchange(default: string, title: string = "", key: string? = null, description: string? = null, sameLine: bool = false, required: bool = false, filter: string[]? = null, when: bool = true) -> string

Adds a single-exchange picker to the script settings.

default sets the starting exchange ID. The result is never null.

  • title labels the control; key identifies it in saved settings.
  • description adds help text.
  • sameLine places the control on the same line as the previous control.
  • required marks the control as required.
  • when hides the control when false.
  • filter limits the available exchanges. Null allows all exchanges.

Optional settings can be left out. The value stays fixed during each run. Changing it applies the new settings and may recalculate history.

ParameterType
defaultstring
titlestring
keystring?
descriptionstring?
sameLinebool
requiredbool
filterstring[]?
whenbool

Returns string

Available in Setup only: declarations, setup and state initialisers.

input.exchanges

Flowscope Script
input.exchanges(default: string[], title: string = "", key: string? = null, description: string? = null, sameLine: bool = false, required: bool = false, minSelected: int? = null, maxSelected: int? = null, filter: string[]? = null, when: bool = true) -> string[]

Adds a multiple-exchange picker to the script settings.

default sets the starting list of exchange IDs, in order. The result array is never null.

  • title labels the control; key identifies it in saved settings.
  • description adds help text.
  • sameLine places the control on the same line as the previous control.
  • required marks the control as required.
  • when hides the control when false.
  • filter limits the available exchanges. Null allows all exchanges.
  • minSelected and maxSelected limit the number of selections. Values outside their allowed bounds are rejected before the script runs.

Optional settings can be left out. The value stays fixed during each run. Changing it applies the new settings and may recalculate history.

ParameterType
defaultstring[]
titlestring
keystring?
descriptionstring?
sameLinebool
requiredbool
minSelectedint?
maxSelectedint?
filterstring[]?
whenbool

Returns string[]

Available in Setup only: declarations, setup and state initialisers.

input.float

Flowscope Script
input.float(default: float, title: string = "", min: float? = null, max: float? = null, key: string? = null, description: string? = null, sameLine: bool = false, required: bool = false, when: bool = true) -> float

Adds a decimal-number input to the script settings.

default sets the starting value. The result is never null.

  • title labels the control; key identifies it in saved settings.
  • description adds help text.
  • sameLine places the control on the same line as the previous control.
  • required marks the control as required.
  • when hides the control when false.
  • min and max limit the allowed values. Null leaves that end unrestricted. An out-of-range or non-finite default is rejected before the script runs.

Optional settings can be left out. The value stays fixed during each run. Changing it applies the new settings and may recalculate history.

ParameterType
defaultfloat
titlestring
minfloat?
maxfloat?
keystring?
descriptionstring?
sameLinebool
requiredbool
whenbool

Returns float

Available in Setup only: declarations, setup and state initialisers.

input.group

Flowscope Script
input.group(title: string = "", key: string? = null, collapsible: bool = false, collapsed: bool = false, when: bool = true) -> void

Groups controls in the script settings.

title labels the group and key identifies it.

  • collapsible lets the user fold the group.
  • collapsed starts the group folded when true.
  • when hides the group when false.

This adds a group and returns no value.

ParameterType
titlestring
keystring?
collapsiblebool
collapsedbool
whenbool

Available in Setup only: declarations, setup and state initialisers.

input.int

Flowscope Script
input.int(default: int, title: string = "", min: int? = null, max: int? = null, key: string? = null, description: string? = null, sameLine: bool = false, required: bool = false, when: bool = true) -> int

Adds a whole-number input to the script settings.

default sets the starting value.

  • title labels the control; key identifies it in saved settings.
  • description adds help text.
  • sameLine places the control on the same line as the previous control.
  • required marks the control as required.
  • when hides the control when false.
  • min and max limit the allowed values and help determine how much history calculations need. An out-of-range default is rejected before the script runs.

Optional settings can be left out. The value stays fixed during each run. Changing it applies the new settings and may recalculate history.

ParameterType
defaultint
titlestring
minint?
maxint?
keystring?
descriptionstring?
sameLinebool
requiredbool
whenbool

Returns int

Available in Setup only: declarations, setup and state initialisers.

input.section

Flowscope Script
input.section(title: string = "", key: string? = null, description: string? = null, sameLine: bool = false, when: bool = true) -> void

Adds a section heading to the script settings.

title labels the section, key identifies it, and description adds help text. Optional settings can be left out. sameLine keeps the section on the same line; when hides it when false. This adds a heading and returns no value.

ParameterType
titlestring
keystring?
descriptionstring?
sameLinebool
whenbool

Available in Setup only: declarations, setup and state initialisers.

input.select

Flowscope Script
input.select(default: string, title: string = "", options: string[], key: string? = null, description: string? = null, sameLine: bool = false, required: bool = false, when: bool = true) -> string

Adds a dropdown of text options to the script settings.

default sets the starting selection and should be one of the strings in options. The result is never null.

  • title labels the control; key identifies it in saved settings.
  • description adds help text.
  • sameLine places the control on the same line as the previous control.
  • required marks the control as required.
  • when hides the control when false.

Optional settings can be left out. The value stays fixed during each run. Changing it applies the new settings and may recalculate history.

ParameterType
defaultstring
titlestring
optionsstring[]
keystring?
descriptionstring?
sameLinebool
requiredbool
whenbool

Returns string

Available in Setup only: declarations, setup and state initialisers.

input.tab

Flowscope Script
input.tab(title: string = "", key: string? = null) -> void

Adds a tab to the script settings.

title labels the tab and key identifies it. This adds a tab and returns no value.

ParameterType
titlestring
keystring?

Available in Setup only: declarations, setup and state initialisers.

input.timeframe

Flowscope Script
input.timeframe(default: timeframe = 1h, title: string = "", key: string? = null, description: string? = null, sameLine: bool = false, required: bool = false, when: bool = true) -> timeframe

Adds a timeframe picker to the script settings.

default sets the starting timeframe. The result is never null. Invalid selections are rejected before any handler runs.

  • title labels the control; key identifies it in saved settings.
  • description adds help text.
  • sameLine places the control on the same line as the previous control.
  • required marks the control as required.
  • when hides the control when false.

Optional settings can be left out. The value stays fixed during each run. Changing it applies the new settings and may recalculate history.

ParameterType
defaulttimeframe
titlestring
keystring?
descriptionstring?
sameLinebool
requiredbool
whenbool

Returns timeframe

Available in Setup only: declarations, setup and state initialisers.