Can someone provide code as to how to extend a line of core.drawLine?

For example, I have:

- Code: Select all
`core.drawLine(Line, core.range(x_1, x_2), y_1, x_1, y_2, x_2, color);`

Which is 2 points, (x_1 and y_1) and (x_2 and y_2)

X is date

Y is price

This draws a line between those two points.

Now I want to see the line in the future (beyond x_2 point)

What must I do to have a line drawn (extended) with accurate slope to find out price x time in the future? (to the most recent bar will suffice)

I am trying to use http://www.fxcodebase.com/documents/Ind ... ation.html but no luck