/* Buff's Moving Averages */
/* Afl Code - Prakash Shenoi */
f=Param(" Fast Periods ",5,1,100);
fa=Sum(V*C,f)/Sum(V,f);
s=Param("Slow Periods ",10,1,50);
sl=Sum(V*C,s)/(Cum(V)-Ref(Cum(V),-s));
Plot (fa,"fast MA",1,1);
Plot (C,"close",5,64);
Plot (sl,"Slow MA",3,1);
GraphXSpace=3;
Title=Name ()+ " Buff Averages "+"\n"+ "Close = " + WriteVal (C,1.2) + " Fast MA = " + WriteVal (fa,1.2) + " Slow MA = "+ WriteVal (sl,1.2);