line.set_xloc
Moves both points and changes what x means (xloc.bar_index or xloc.bar_time).
line.set_xloc(id: line, x1: int/float, x2: int/float, xloc: string)
Parameters
idline: The line's handle (from line.new); na or a deleted line does nothing.x1int/float: x of the first point, read as xloc says.x2int/float: x of the second point, read as xloc says.xlocstring: xloc.bar_index (x is a bar index) or xloc.bar_time (x is a UTC ms time).
Example
l.set_xloc(time[10], time, xloc.bar_time)