FindHeadAndShoulders(TrendSize, Bar, Distance);
TrendSize - The amount in percent a price has to move to be counted as a pivot point.
Bar - This specifies which price bar to use for calculating the head and shoulders pattern. The current last bar is equal to the total number of bars minus 1.
Distance - Is the maximum percentage distance between the two shoulders in the pattern for the current pattern to be counted.
The return from the function is 0 if no pattern was found. If a bullish pattern is found, the return value is 1. If a bearish pattern is found, the return value from the function is 2.