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

[amibroker] Bar chart help



PureBytes Links

Trading Reference Links

Hi,

I am trying to plot this bar chart in the following manner.  If the close crosses above the MA, bar is green, otherwise it is black.  If close crosses below MA, bar is red, otherwise is black.  I am only seeing green bars and not red bars.

this is the code:

Any help is appreciated,

Thanks


SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));

Plot ( C, "Close", IIf (Cross (Close, Ref ( MA ( Close, 3),-3 )), colorGreen,colorBlack), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ) ;
Plot ( C, "Close", IIf (Cross (Ref ( MA (Close,3),-3 ), Close ), colorRed,colorBlack), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );




Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS