Volume afl for Amibroker


Volume afl for Amibroker


  • Volume Lines for VSA from AmiFiles
  •  The code here was found on traderguider web site....
  •  A 30 period moving average can be used to determine if Volume is greater than average or less than average.
  •  if you put a 2.0 standard deviation of that 30 average on the chart as well,
  •  then you could call all Volume histogram bars greater than that line High.
  • You could also place a 3.0 standard deviation of the average on the chart AND call all
  • Volume histogram bars greater than that Ultra High Volume. This is basically what TG does.



_SECTION_BEGIN("Modified Volume");
// Volume Lines for VSA from AmiFiles
// The code here was found on traderguider web site....
// A 30 period moving average can be used to determine if Volume is greater than average or less than average.
// if you put a 2.0 standard deviation of that 30 average on the chart as well,
// then you could call all Volume histogram bars greater than that line High.
// You could also place a 3.0 standard deviation of the average on the chart AND call all
// Volume histogram bars greater than that Ultra High Volume. This is basically what TG does."

GraphXSpace = Param("Xspace", 10, 2, 20, 1);
// vol with std
LBP = Param("Look Back", 30, 0, 150,1 );
Mean = MA(ln(V),LBP);
StD = StDev(ln(V),LBP);
xp3 = exp(mean + 2*std); //3 band
xp2 = exp(mean + 1.5*std); //2 nd band
xp1 = exp(mean + 1*std); // 1st band
xm = exp(mean); // avg
xn1 = exp(mean - 1*std); // -1 band
xn2 = exp(mean - 1.5*std); //-2 band
Plot(xp3,"", 1,1|4096);
Plot(xp2,"", 1,1|4096);
Plot(xp1,"", colorOrange,1|4096);
Plot(xm, "avg", colorYellow,1|4096);
Plot(xn1,"",colorPaleBlue,1|4096);
Plot(xn2,"", 1,1|4096);
Clr = IIf(V>Ref(V,-1),29,32);
Plot(V,"vol",Clr,2+4);
PcntInc = NumToStr((V-xm)/xm*100,2);
_N(Title = "{{NAME}} - {{INTERVAL}} {{DATE}}: "+_DEFAULT_NAME()+" : {{VALUES}}"
+"\n"+EncodeColor(colorGreen)+
WriteIf(V > XM*(1 + (LBP * .01)),"Volume is("+PcntInc+")% ABOVE its("+Lbp+")average :","")+
WriteIf(V < XM*(1 + (LBP * .01)),"Volume is("+PcntInc+")% BELOW its("+Lbp+")average :",""));
_SECTION_END();

Volume afl for Amibroker Volume afl for Amibroker Reviewed by Money99 on 09:47:00 Rating: 5
Powered by Blogger.