You need to combine two plot() into one, otherwise
they just overlapping.
Plot(...IIF(..., colorGreen, IIF(..., colorRed,
colorBlack)) ... ).
----- Original Message -----
Sent: Tuesday, April 25, 2006 6:58
PM
Subject: [amibroker] Bar chart help
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
YAHOO! GROUPS LINKS
|