This may not be related to AFL but i want to know the length of a line in a chart(line).
Did you think about it?
Length mathematically is square root from sum of squared x and y differences,
length = sqrt( (x2-x1)^2 - (y2-y1)^2 );
But if you thought about it a little you would quickly understand that you can't calculate "length" because X and Y axes are NOT using same "unit".
X axis is TIME, Y axis is PRICE. You can't simply discard units and time is NOT price.