Afl for plotting multiple AVWAP"S

Hi,
Asking for help after sometime so apologise in advance if there is some improper presentation.

Some weeks ago came across an AFL for plotting the AVWAP, was thrilled and since then have been trying to modify this AFL to enable the plotting of multiple AVWAPS - same as always no sucess and now am requesting for guidance:

the code is below


_SECTION_BEGIN("CustomAVWAP");

AVWAP  = ParamToggle("AVWAP","OFF|ON",0);

 if( AVWAP )
 {

dn = DateTime();
sd = SelectedValue( dn );
start = dn == sd;

mp = C;
PV = mp * V;
CV = Cum( V );
VSS = CV - ValueWhen( start, CV );
denom = IIf( VSS == 0, 1, VSS );
num = Cum( PV ) - ValueWhen( start, Cum( PV ) );
M = IIf( BarsSince( start ), num/denom, mp );


Plot( M, "AVWAP", colorBrightGreen, styleThick );
}

_SECTION_END();

and a screen shot on an hourly chart of the index futures, the lime coloured thick line is the AVWAP

image

I would like to plot multiple AVWAP.s with different colours.

Thanks in advance.

hI,

oops made another bu bu, some more effort and found that @empottasch has already presented the solution in 2018.

Thanks to him all I have to do is to write , basically cut copy paste a few lines so that the plots are of different colors.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.