OPEN-SOURCE SCRIPT

Wave Smoother [WS]

The Wave Smoother is a unique FIR filter built from the interaction of two trigonometric waves. A cosine carrier wave is modulated by a sine wave at half the carrier's period, creating smooth transitions and controlled undershoot. The Phase parameter (0° to 119°) adjusts the modulating wave's phase, affecting both response time and undershoot characteristics. At 30° phase the impulse response starts at 0.5 and exhibits gentle undershoot, providing balanced smoothing. Higher phase values reduce ramp-up time and increase undershoot - this undershoot in the impulse response creates overshooting behavior in the filter's output, which helps reduce lag and speed up the response. The default 70° phase setting provides maximum speed while maintaining stability, though practical settings can range from 30° to 70°. The filter's impulse response consists entirely of smooth curves, ensuring consistent behavior across all settings. This design offers traders flexible control over the smoothing-speed trade-off while maintaining reliable signal generation.
COSfilterHMAMoving AveragessinesmootherTRIG

Open-source script

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 publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Also on:

Disclaimer