Please try the following: function VWMA( array, period )
{ return Sum( array * V, period ) / Sum( V, period ); } P = ParamField("Price field",-1); Periods = Param("Periods", 15, 2, 300, 1, 10 ); Plot( VWMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") ); NOTE: This TJ's Code. From: foginthehills Sent: Friday, December 12, 2008 3:29 AM To: amibroker@yahoogroups.com Subject: [amibroker] Understanding Volume-Weighted Moving Average? Hi guys, I am trying to understand Volume Weighted Moving Average. The AFL seems to be as follows (a 10-day example): VWMA = Sum((Volume*Close),10) / Sum (Volume,10); This looks like a regular MA. Does it make sense to use an EMA version of this? What would the AFL look like for that? Thanks as always for any help! Andrew (Fog)