Volume weighted moving average for Amibroker (AFL)
Copy & Paste Friendly
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 1000, 1, 10 );
Vwma = Sum((Volume*P),periods)/Sum (Volume,periods);
Plot(Vwma,_DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );