TrendingView Indicator Development -- 2

Job ID: 38198468

Budget: $10 – $30 USD

I want to create a very simple indicator. First, we will need the Zigzag indicator, and secondly, we will need lines. There is an advantage in lines, which is knowing the inclination of an angle, and this is what we want. Well, all we want is to identify the vertices of the ziq zaq that are close together according to the angle we have. I will show you some examples and they will clarify this idea.

I have attached a picture of the angle we want and some examples of what we want, but... There is a matter for which we must find a solution. I have used this indicator before, but I encountered a problem, and I will attach a video of the problem that I encountered, which is when I reduce or enlarge the screen or move it, the angle ratios change, which makes the selection wrong.
Related categories: Pine Script Trading