I don't understand the comments that divergence is useless. Alex Elder considers it the most powerful signal in technical analysis. Divergence between an oscillator and price is not a signal per se. Rather it is a condition. It is showing a loss of momentum even though price has nominally shown more (or less) strength. Typically, this loss of momentum presages a trend reversal, but not always. Sometimes you can get two or three divergences before price responds.
The key to using divergences is to require some kind of price generated signal to enter the trade. Trend line breaks are good. The divergence is the set-up, the trend line break is the entry trigger.
As I recall, TradeStation has a divergence function , but I don't think I could ever get it to work properly in backtesting. I am not a big fan of using simple observation to validate systems or methodologies, but in this case I think that approach may be preferable to backtesting. At the very least, a divergence signal is an important warning that the trend is nearing exhaustion. Ignore it at your peril.