Lipi Reference
Lipi

Functions

array.new_string()

Creates an array of `string` elements with `size` elements, each set to `initial_value`. Both arguments are optional: leave `size` out for an empty array, and `initial_value` out for elements that start as `na`.

Syntax

                array.new_string(series int size, series string initial_value) → series array<string>
              

Arguments

size series int
initial_value series string

Return Type

series array<string>

Example


          //@lipi=2
indicator("array.new_string Example", overlay=true)
names = array.new_string(0)
array.push(names, "Open")
array.push(names, "High")
array.push(names, "Low")
if barstate.islast {
    label.new(bar_index, high, text=array.join(names, ", "))
}