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.

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)