It uses the Jurik moving average to determine turning points, and will plot the tops and bottoms of the wave based on the most recent high- so you can also use to quickly find highs and lows. If you are using with the R100 Wave indicator, first adjust the wave to fit better (if required) using the Jurik length and/or power, and then use the same settings on the Wave indicator. Default settings work pretty well for most stocks, but adjusting the length between 8 and 14 should be enough for a good fit, or adjust the power between 1 and 3, or get fussy and tweak it with both.
The Jurik MA has been modified to include a component, so will only work where you have . The last "leg" of the wave will move about until the next high or low is found and then will remain fixed.
I hope you find some value with it. Only conditions of use are that if you improve it, let me know and if you publish something that uses it, don't hide the code! Enjoy!
Code pinched and modified from Zero Lag by Duyck - thankyou
Jurik Moving Average (for turning points) by Everget - thankyou
and Weis Wave by Modhelius - thankyou
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.