Skip to content
Algo Trade Analytics Docs
Pine library page — review pending. This page is preserved for compatibility but is not part of the reviewed search index. Check the official Pine Script v6 reference before relying on its explanation, signature, or example.

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)