Add your favorite oscillator, , , TSI, CMF , or anything else to a chart.
Click the little ... (More) on the oscillator.
Then add this indicator "Divergence Indicator (any oscillator)" on your oscillator of choice.
Click the settings on this indicator and make sure the source is set to the right plot from your oscillator.
Watch for it to plot divergences...
Add this indicator a second time on the price chart (and select the same oscillator plot), but check the box "plot on price (rather than on indicator)""
See you divergence plotted on price (as well as on the oscillator)
By request of @cyatophilum @AbhijeetMuneshwar
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 a publication is governed by House Rules. You can favorite it to use it on a chart.