[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: Color of Volume Bars



PureBytes Links

Trading Reference Links



Color your bars!

You can easily plot multi colored charts using both Plot function and 
graph.. variables. All you need to do is to define array of color 
indexes. In the following simple example up bars are plotted with 
green and down bars are plotted with red color:

col = IIF( Close > Ref( Close, -1 ), colorGreen, colorRed );
Plot( Close, "Price", col, styleBar );

The same can be achieved using old-style graph... variables:

graph0barcolor = IIF( Close > Ref( Close, -1 ), colorGreen, 
colorRed );
graph0style = styleBar;
graph0 = Close;
graph0name = "Price";

The next example is essentially the same with the difference that we 
plot volume instead of the price chart:

col = IIF( Close > Ref( Close, -1 ), colorGreen, colorRed );
Plot( Volume, "Volume", col, styleHistogram | styleThick );

Hope you enjoy your charts in new colors!




--- In amibroker@xxxxxxxxxxxxxxx, "syntego" <bob.hong@xxxx> wrote:
> 
> 
> Can someone tell me if it is possible to change the color of the
> Volume bars so that a bar whose price closes up from the prior is
> Black and a bar whose price closes down is Red?
> 
> I'm a new user and from the preferences it looks like there is only
> one color setting for volume.
> 
> Thanks,
> 
> Bob





------------------------ Yahoo! Groups Sponsor --------------------~--> 
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/