Lipi Reference
Lipi

Functions

array.from()

Creates an array from the values passed to it, in order. All values must be of the same type, which becomes the element type.

Syntax · 1 of 11

                array.from(series int arg0, arg1, ...) → series array<int>
              

Arguments

arg0, arg1, ... required series int

Return Type

series array<int>

Syntax · 2 of 11

                array.from(series float arg0, arg1, ...) → series array<float>
              

Arguments

arg0, arg1, ... required series float

Return Type

series array<float>

Syntax · 3 of 11

                array.from(series bool arg0, arg1, ...) → series array<bool>
              

Arguments

arg0, arg1, ... required series bool

Return Type

series array<bool>

Syntax · 4 of 11

                array.from(series string arg0, arg1, ...) → series array<string>
              

Arguments

arg0, arg1, ... required series string

Return Type

series array<string>

Syntax · 5 of 11

                array.from(series color arg0, arg1, ...) → series array<color>
              

Arguments

arg0, arg1, ... required series color

Return Type

series array<color>

Syntax · 6 of 11

                array.from(series label arg0, arg1, ...) → series array<label>
              

Arguments

arg0, arg1, ... required series label

Return Type

series array<label>

Syntax · 7 of 11

                array.from(series line arg0, arg1, ...) → series array<line>
              

Arguments

arg0, arg1, ... required series line

Return Type

series array<line>

Syntax · 8 of 11

                array.from(series box arg0, arg1, ...) → series array<box>
              

Arguments

arg0, arg1, ... required series box

Return Type

series array<box>

Syntax · 9 of 11

                array.from(series linefill arg0, arg1, ...) → series array<linefill>
              

Arguments

arg0, arg1, ... required series linefill

Return Type

series array<linefill>

Syntax · 10 of 11

                array.from(series polyline arg0, arg1, ...) → series array<polyline>
              

Arguments

arg0, arg1, ... required series polyline

Return Type

series array<polyline>

Syntax · 11 of 11

                array.from(series table arg0, arg1, ...) → series array<table>
              

Arguments

arg0, arg1, ... required series table

Return Type

series array<table>

Example


          //@lipi=2
indicator("array.from Example", overlay=true)
prices = array.from(open, high, low, close)
plot(array.avg(prices), title="OHLC Average", color=color.blue)