@Peter_O, it depends. As a matter of fact, in addition to a derivative function I use a smoother, such as Kahlman smoother/filter. It may be any other function that straightens the curve. As you can see, the derivative function (or just the normalized negation of the price) features one important thing: it's getting closer to price as the price begins to revert, and crosses the price as the reversion has completed.
@capissimo, I didn't have smoothing in mind. What I had in mind was that when market trends DOWN, the sig line is ABOVE the market. But your shortCondition says to go short when sig crossesUNDER the price. ShortCondition should be when sig crossesOVER the price.
@Awes1989, any crossover is an indication of a strong upcoming movement. In automatic regime it should be used in conjunction with other tools. When working manually, you judge by the price action currently under way.