Skip to main content

BS Volume for Amibroker (AFL)

chauchau1207 about 3 years ago Amibroker (AFL)

  • Rating:
    5 / 5 (Votes 1)
  • Tags:
    amibroker

The effective Volume is a modified version of the Accumulation Distribution Indicator proposed by Larry Williams.

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("BS volume V.1.0");
jb  = Param("Buy volume Factor",3,2,4,0.1);
js  = Param("Sell volume Factor",3,2,4,0.1);
num = C - Ref(C,-1);
Hi  = Max(High, Ref(C,-1));
Li  = Min(Low, Ref(C,-1));
EVt = abs(num /(Hi-Li));
EV = IIf( C>Ref(C,-1),V*EVt,V*(-1)*EVt);
BuyV = IIf(EV>0,EV,0);
SellV = IIf(EV<0,EV,0);
BVA = EMA(BuyV,40);
SVA = EMA(SellV,40);
IBV = IIf(EV>(jb*BVA),ev,0);
SBV = IIf(EV<(js*SVA),ev,0);
Plot(BVA,"",51,1);
Plot(SVA,"",33,1);
SetBarFillColor(colorYellow);
PlotOHLC(0,IBV,0,IBV,"EV",31 , styleCandle) ;
SetBarFillColor(colorYellow);
PlotOHLC(0,SBV,0,SBV,"EV",31 , styleCandle) ;
SetBarFillColor(IIf(EV>0, colorLime,colorRed));
PlotOHLC(0,EV,0,EV,"Effective Volume V.1.0",31 , styleCandle) ;
PlotOHLC( BVA,  BVA,  0, 0, "", 51,styleCloud ); 
Plot(BVA,"Up",51,styleCloud ); 
PlotOHLC( SVA,  SVA,  0, 0, "", 33,styleCloud );
Plot(SVA,"Down",33,styleCloud );
//Title=EncodeColor(colorYellow)+Name()+"  "+"BS Volume V.1.0 ";
_SECTION_END();

2 comments

over 2 years ago

Hi, this scipt error in line 14

warning 505. devision by zero. divisor array at 3 is equal zero

over 2 years ago

Hi, this scipt error in line 14

warning 505. devision by zero. divisor array at 3 is equal zero

Leave Comment

Please login here to leave a comment.