FindDoublePattern

Parent Previous Next

FindDoublePattern(TrendSize, Bar, Threshold);


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.


Threshold - Is the maximum percentage distance between the the price and the support or resistance line for it to be considered touching when the pattern is being calculated.


The return from the function is 0 if no pattern was found. If a bullish pattern was found the return value is 1. If a bearish pattern is found the return value from the function is 2.