peak function

Find Peaks and Valleys In A Series