Linearray extend

With Linearray is seems like I can either end the line at (x1,y1) or extend it infinitely. But I'd like to extend it 10 bars beyond (x1,y1) then stop plotting. How would I do this please?

Why not just calculate x2,y2 based on the slope of the line between x0,y0 and x1,y1, and then pass x2,y2 to the LineArray function? Something like this untested snippet should work:

extBars = 10;
x2 = x1 + extBars;
slope = (y1-y0) / (x1-x0);
y2 =y1 + (slope * extBars);

Thanks very much mradtke - works perfectly!

In that case, you should mark the post as the Solution and/or Like it. :slight_smile: