Lipi Reference
Lipi

Functions

box()

Converts `value` to the `box` type. It is used almost only as `box(na)`, to declare a box variable that has no drawing yet, so that its type is known before the first drawing is assigned.

Syntax

                box(series box value) → series box
              

Arguments

value required series box

Return Type

series box

Example


          //@lipi=2
indicator("box() Example", overlay=true)
static box rangeBox = box(na)
if barstate.islast {
    rangeBox := box.new(bar_index[10], talib.highest(high, 10), bar_index, talib.lowest(low, 10), bgcolor=color.new(color.blue, 0.2))
}