I've split the script in 3 separate ones:
Default settings are without lines (faster)
If you want to see the lines, enable the "Just show Arrows (No Lines)" button
When the message "Calculation timed out.Remove the indicator and reapply it to the chart" is visible,
try to refresh or pick another TimeFrame (and return to the previous TF), normally it will work then.
Thank you very much!
also Divergences are loading quicker ;-)
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.
Best to adjust the settings and enable "Just Show Arrows (No Lines)"