AFL for Volume Weighted MA (VWMA)

MarketSecrets - Learn To Trade Like a Pro

AFL for Volume Weighted MA (VWMA)

This Amibroker script is designed to provide Volume Weighted MA ( VWMA ) in Amibroker

Script:

SetChartBkGradientFill( 54, 54 );

function VWMA( price, pds )
{
    aa = Sum( ( Volume * price ), pds );
    bb = Sum( Volume, pds );
    Cc = aa / Nz( bb );
    return Cc;
}

pr = ( 2 * Close + High + Low ) / 4;

Plot( Close, “Close”, 1, 64 );
Plot( VWMA( pr, 8 ), “Close”, 29, 5 );

 

Download AFL

error: Content is protected !!