line.get_x1() - Pine Script Function
line.get_x1()
Section titled “line.get_x1()”Overview
Section titled “Overview”Returns UNIX time or bar index (depending on the last xloc value set) of the first point of the line.
Syntax
Section titled “Syntax”line.get_x1(id) → series intParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| id | series line | Line object. |
Returns
Section titled “Returns”UNIX timestamp (in milliseconds) or bar index.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”//@version=6indicator("line.get_x1")my_line =line.new(time, open, time + 60 * 60 * 24, close, xloc=xloc.bar_time)a = line.get_x1(my_line)plot(time - line.get_x1(my_line)) //draws zero plot