For Constance Brown-like analysis with divergence signals between price and indicator (i.e. stock close / RSI divergence)
Using two different lines: an indicator high line for bearish, and an indi low line for bullish divergences
For your individual studies, choose your indicator and replace rsi in line 10 with it, any thing else is auto. Script bottom: optional comparison linse addable
Note1: The script only shows divergences to recent pivots, not between actual pivot and one "a few pivots ago"
Note2: Though reversal predictions with the example of SPLK here are quite good, in general better results are obtained with un-normalized indicators.