The script is inspired by LazyBear Ehlers-Smoothed with Roofing Filter, except I find that the Roofing filter (existing implementation) does not work well near extreme price changes, where a regular formula is preferable. The Super Smoother however is excellent and seems to provide earlier signals in most cases than an EMA-EMA smoother. Combined, the super-smoother and regular formula provide very good results.
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.