OPEN-SOURCE SCRIPT

Pekipek's PPO Divergence BETA

Beta divergence indicator, you can exchange the Price Percentage Oscillator (PPO) for any oscillator. You can play around with the look-back period if you want to use long term divergences.
WARNING:
Because its impossible to make the look-back period of the lowest/highest functions dynamic, the indicator can plot divergences sometimes at places where there are none, however in my experience this does not occur so much. Also it is impossible to plot isolated lines, so its hard to visually see which divergence(s) exactly is(are) being signaled. Once these features become possible I can really refine the indicator.
DivergencePrice Oscillator (PPO)

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer