EVWMA is a quite interesting moving average where period of the MA is defined from itself.
It incorporates information in a natural and logical way. The eVWMA can be looked at as an approximation to the average price paid per share.
As a period you can use sum of the last x bars volumes.
Here is EVWMA as an indicator:
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.