I know the Volume Weighted Moving Average indicator is available in PRT as an indicator but the code is not available for strategy building so I created the code.
Formula: 3-Day VWMA = (C1*V1 + C2*V2 + C3*V3) / (V1+ V2+ V3)
Where C is close and V is volume
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
// Volume Weighted Moving Average (VWMA) // By Gabor Gulyas Oct. 2019 tempValue = 0.0 tempVolume = 0.0 for step = 0 to length do tempValue = tempValue + (close[step] * volume[step]) tempVolume = tempVolume + volume[step] next vwma = tempValue / tempVolume return vwma |
Basic strategy as from “https://www.tradingsetupsreview.com/volume-weighted-moving-average-vwma/”
To fully make use of the Volume Weighted Moving Average (VWMA), compare it with a SMA that does not include volume.
The SMA is a benchmark. This means that you should choose the same look-back period for both the SMA and the VWMA. The only difference between the two moving averages is volume weighting.
What matters here is the gap between the VWMA and the SMA. Their difference shows the effect of volume weighting.
Generally, volume should increase along with the trend and decrease against it. Hence, generally, if the VWMA is above the SMA, it means that volume has been higher on up days. When the VWMA is below the SMA, it shows that down days had higher volume.
The Volume Weighted Moving Average has the ability to help discover emerging trends, identify existing ones and signal the end of a move.
What it does is to incorporate not only the last x periods of price into its calculation but also the average volume during those x periods. That means when the volume is stronger, the VWMA will follow price more closely, and when volume falls off, it will mimic a simple moving average. The VWMA does not make a difference between buying and selling volume, only the strength of volume itself, so it will simply get closer to the close of the day when volume increased on that day, no matter whether it is a bearish or a bullish close.
Important is – if the VWMA is above the SMA, we are moving in an uptrend, and when it is below, we do have bearish implications. Or even simpler, as long as the VWMA is between price and the SMA, we are trending in that direction.
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Bonsoir –
Voici l’erreur qui est signalée lorsque je souhaite utiliser cet indicateur : il est demandé de définir “lenght” – Pouvez-vous m’aider ? Merci infiniment