Skip to content
Algo Trade Analytics Docs

box - Pine Script Type

Keyword used to explicitly declare the “box” type of a variable or a parameter. Box objects (or IDs) can be created with the box.new function.

  • Box objects are always of “series” form.
//@version=6indicator("box")// Empty `box1` box ID.var box box1 = na// `box` type is unnecessary because `box.new()` returns a "box" type.var box2 = box.new(na, na, na, na)box3 = box.new(time, open, time + 60 * 60 * 24, close, xloc=xloc.bar_time)