Skip to main content

Controlling Height of Volume Bars for Amibroker (AFL)

kaiji over 16 years ago Amibroker (AFL)

  • Rating:
    5 / 5 (Votes 2)
  • Tags:
    amibroker, histogram, volume

It allows a user defined volume histogram overlay in your price pane. Many traders may find it useful by conserving real estate on the chart windows. Also, can some of our fine amibroker’s code writers insert a simple moving average over the volume, some may agree this would also be very useful.

Indicator / Formula

Copy & Paste Friendly
PlotVOL = ParamToggle( "plot Volume?","No| Yes",0);

VolColor = (C>O OR (C==O AND (H-C)<=(C-L)))*ParamColor ("VUpColor" ,colorGreen) +
           (C<O OR (C==O AND (H-C)>(C-L)))*ParamColor( "VDnColor" ,colorRed) ;

VolScale = Param("1/Vol. Height (TimeBar chart)(fraction of window) 5=1/5=20%",5, 2, 100, 1.0) ; // Timebars

if (PlotVOL >0)
{
	Vheight = VolScale;
	Plot(Prec(Volume ,0),"V",VolColor, styleNoTitle| styleOwnScale| styleThick|
	ParamStyle( "VStyle", styleHistogram, maskHistogram) ,Vheight );
}

1 comments

Leave Comment

Please login here to leave a comment.