Method-call spelling of chart.point.copy(): point.copy() returns a new chart.point with the same three fields.
chart.copy() is what point.copy() resolves to. Both give a new point with the same index, time and price, and editing the new point leaves the old one alone.
Write the method form in your own code; the long name chart.point.copy() is the one that takes the point as an argument.
Syntax
chart.copy() -> chart.pointReturns
chart.point: A new chart.point with the same index, time and price.
Remarks
- On Sidechair:
chart.copy()warns that it isn't supported yet and gives na, because the points it would copy cannot be created.
Example
//@version=6
indicator("chart.copy: anchor copy", overlay = true)
var p = chart.point.now(close)
q = p.copy()
plot(q.price - p.price, "Difference")See also
Not on Sidechair yet