jcl,

how do peak, valley, rising falling work?

Clearly they compare the current value in the series to previous values, but to how many previous values, and is there any smoothing or other processing techniques applied?