VMA (Volume-Weighted Moving Average) calculation
Author: thodder
Creation Date: 10/20/2011 4:40 PM
profile picture

thodder

#1
The documentation for VMA (http://www2.wealth-lab.com/WL5Wiki/VMA.ashx) defines the parameters with a DataSeries as input. Bars have volume, but I don't believe a Dataseries has volume. How can it volume weight the calculation?? Since this indicator is in the standard library, I can not review the code.
profile picture

Cone

#2
You're right. If it were written correctly, that indicator should take a Bars object. Consequently, the indicator works only for the current Bars in context. In other words:

CODE:
Please log in to see this code.
I've added a note to the documentation. Keep in mind that you could create a new indicator (like a VMA2) that takes a Bars object too.
profile picture

thodder

#3
Thanks Cone!