How does Patternz work?
First I identify the peaks and then I find the valleys in a historical price series. Once I have those, then it is just a matter of stitching them together. A triple top is just three peaks near the same price. The algorithms are simple ’if-then-else’ constructs but the package is quite accurate and very fast. If you want a more technical approach, then create a software package (genetic algorithm) that when given a date range where a known-good chart pattern appears, it will determine the recognition rules and then find other examples, learning from its mistakes. That will take longer to build than the 3 months or so it took to write Patternz.