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.
you can remove repaint completly by editing the input confirmation in the source and replace it by this:
confirmation = input(defval=0, minval=0, title="Confirmation", group = "Divergence")
but with no confirmation lot of false signal appear