This script Identifies diagonal lines that touch or nearly touch at least 3 pivot points.
SETTINGS
Left/Right bars: have to be adjusted to the timeframe and ticker
Source: to chose the price level used to draw the lines
3rd Point offset: How distant % wise from the diag the third point has to be to show the line
Max Slope: adjust to remove lines that point too far high or too far below the chart. Also a % value based on the maximum slope of the chart
Max bars crossed: It removes the diags that cross too many candle bodies to keep the chart clean