Hamming Windowed Volume Weighted Moving Average

Applying a window to the filter weights provides sometimes extra control over the characteristics of the filter.In this script an hamming window is applied to the volume before being used as a weight.In general this process smooth the frequency response of a filter.

Lets compare the classic vwma with hamming windowed vwma

Something i noticed is that windowed filters depending on their period (high ones in general) tend to make less bad crosses with the price (at least with the hamming window)

Here are some data regarding number of crosses with period 50 with the hamming vwma in orange and the classic vwma in purple

Feel free to use the hamming window when using weighted filter.
Remove from Favorite Scripts Add to Favorite Scripts
« Je suis las des cruautés de mes semblables, qui ne sont pas mes pareils.

« Je prendrai l’essor et je m’envolerai vers la mer.

« Je connaîtrai le goût des brises du large. J’entendrai les grands cris de la tempête.


I think this hamming window should be precomputed in an array of the window length. I think this implementation creates an oscillating hamming filter oscillates rather than being a sliding window over the volume. Sadly TV doesnt have arrays :'(
+1 Reply
alexgrover 1996anoojpatel
@1996anoojpatel, You are correct, will be fixed in an update.
+2 Reply
alexgrover 1996anoojpatel
@1996anoojpatel, I decided to introduce new windows, this time it is done the right way.

Thanks for your comment !
+1 Reply
beautiful work
+1 Reply
Home Stock Screener Forex Screener Crypto Screener Economic Calendar How It Works Chart Features Pricing Refer a friend House Rules Help Center Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Blog & News Twitter
Profile Profile Settings Account and Billing Refer a friend My Support Tickets Help Center Ideas Published Followers Following Private Messages Chat Sign Out