Skip to content
Algo Trade Analytics Docs

line - Pine Script Type

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

  • Line objects are always of “series” form.
//@version=6indicator("line")// Empty `line1` line ID.var line line1 = na// `line` type is unnecessary because `line.new()` returns "line" type.var line2 = line.new(na, na, na, na)line3 = line.new(bar_index - 1, high, bar_index, high, extend = extend.right)