Types
chartPoint
A single position on the chart, described by three fields: time carries when, index carries which bar, and price carries where on the price scale. All three fields are series, so a point built on one bar need not hold the same coordinates as one built on the next.
Fields / Members
time series int The x-coordinate of the point, expressed as a UNIX time value, in milliseconds. index series int The x-coordinate of the point, expressed as a bar index value. price series float The y-coordinate of the point. Example
//@lipi=2
indicator("chartPoint Example", overlay=true)
if barstate.islast {
chartPoint p1 = chartPoint.from_index(bar_index[20], low[20])
chartPoint p2 = chartPoint.from_index(bar_index, high)
line.new(p1, p2, color=color.blue, width=2)
}