Thank you for the comments. The chart also shows that markets are assymetric, fear and greed do not create the same feedback patterns. In the stock market topping patterns take longer time than bottoming patterns. It is not unusual to see double or triple tops, but rarely you will notice a double bottom with low volatility.
I agree that MACD signals work better with a zero line cross and when volatility is high, so it might give you an edge for stock index bottoms or commodity tops. These are U-class peaks and troughs and not similar to the moderate S-class peaks and troughs.
So to apply a MACD divergence indicator, you might first need to qualify the type of market. Apply it to a high volume climax move and it might work, apply it to a wedge, and you will get a quadruple divergence, which is a failed triple and failed double divergence.
The problem of the divergence is that it only measures the peak (trough) behaviour, but not the trendline side of the price action. If you have an ascending triangle, on the peakside it creates a divergence, on the trendline side it is a continuation pattern. How would you qualify this?
Yes I was thinking the same. I like divergences and use them in my trading but they have to be taken in context. So it can be a really lengthy discussion, interesting nonetheless.
I'm really interested in the algorithm. This is one thing I've never been able to automate. Which btw, when I say automation I'm not talking about an automated strategy but rather having visual or audio alerts of divergence so that I can inspect it and decide what to do.
I haven't had time to study all the examples in depth but will get to that soon. The MT4 indicator looks the most promising but I don't know MT4's programming language and it looks a bit complicated.
I may continue my current approach, which is to brute force cover all the possible patterns between two data series. for 3 bars it's easy and a lot of the divergences I'm looking for a re 3-5 bars.