If you wanna run a stock's intraday data through an algorithm to identify a few "well-known" technical patterns such as H&S or rounding top, then apparently you need to define the mathematical/statistical properties of them. Given they are rather abstract or loosely defined and scale-invariant, how does (or can) one approach such an exercise? Any pointer is much appreciated.