%% EASY to illustrate in hindsight. Same way with inverse H&S, hindsight. USING round numbers, investopedia.com illustration. Start price $7, left shoulder peak/$12, head peak/$14; right shoulder peak area,$11............Much more common, is right shoulder is an uptrend. [Inverse H&S , somewhat the same , except the head area is the VERY bottom, hindsight.] I don't use them, so many tops + bottoms look very different, even in hindsight.
This. So one solution is to create multiple Highs-lower, Highs possible "candidates" for the head and the shoulders across time periods*. Then choose the one that makes the sense. Choosing involves selecting relative "high" and relative "lower highs". Once you start coding up the parts, the solution falls out pretty quickly. Two things help you out. 1) The older they Highs the less relevant they are to the present. 2) The trading day (with normal volume) begins and ends. You don't need a complete solution for all times, but merely something that is action-able. QED *Not timeframes as in different candles periods.
I tried to do this a long time and if anything it is a good exercise in seeing how loosely defined most chart patterns really are. Being older and hopefully wiser now, I think supervised learning and training an image classifier would be the way to go. That is going to be the closest to what you are actually doing with your eyes too compared to some kind of programmatic rule set. The classifier would be easy to make, you could probably modify any dog vs cat image classifier tutorial. All the work would be in labeling and building the training set. I don't think it would be that valuable though. You still wouldn't know if after the head and shoulders price is going to move above the head or below the shoulder.
No, I am not that interested in using classifiers trained by my raw-full-of-nonsense classifications..Which is why I want to quantify such patterns and getting absolutely lost
An image classifier would also give a confidence score in the prediction. You could also generate synthetic idealized versions of the chart patterns to include in the training data. I would say this is just a different, more probabilistic way to quantify the chart pattern. Trying to quantify the pattern procedurally will run into a wall at the boundary between head and shoulders vs not head and shoulders. You will just have to end up making completely arbitrary decisions at some point. If you take a step back this is ultimately a classification problem. The first time I read about using an image classifier for chart patterns, I thought it was one of the dumbest things I have ever read . I figured these must be computer science students with no idea about trading. Since then it was reading how people use a spectrogram image of a waveform to classify audio and especially plotting the mouse movements someone makes into an image and then using that image to classify user behavior. Image classifiers are powerful that it makes sense to try to do a domain transform of your problem into an image in some cases. For chart patterns though, it is practically the same domain.