re: a mathematical question stockmarket
Hmmm... there have been T/A 'black box' trading software/systems around for yonks .. all espousing magic-maths of one kind or another.
Charting programs attempt to do this with a graphical interface.
There is concern that the focus on System-Testing even within the esteemed Metastock is creating assumptions that test the 'suspension of disbelief' of us mere mortals.
IMHO .... even the best only work in Bull Markets.
Translation: There is no holy grail.
We are however, of many tribes and not to forget that even Gannites/Elliott Wavers and such qualify as T/A.
The pro's usually operate with a combination of reseach, T/A as the TIMING tool and news.
Also, it is worth noting that trading the Markets is not about linear maths but probabilities ... my hit rate is 2/3 or 65% and I manage the downside risk.