I am trying to write the code to find the following pattern anywhere in the chart.
It is very hard for me to understand how to do it or how to start or how to think about coding it.
As an example, I want to detect the following pattern, where there are 5 higher highs and higher lows.
The issue is that among the pattern and inside each line there might be several small highs/lows that makes me confuse how to filter them .
I tried to provide several examples of the pattern. The pattern has 5 higher highs, the lows are higher lows, I would like to cluster every 5 highs as one pattern, now if there is 7 higher highs, there will be two of this pattern with overlaps (but that is the next step, at te moment I dont even know how to start).
I would really appreciate any help on how to start coding and thinking about the solution for such a pattern detection.