This is an example of what I think it
is you want to do. See lower part: shading. Note: the background of the chart
used is black.
rgds, Ed
per = 80; mm = (H + L)
/ 2;
x = Cum(1); lastx = LastValue(x); selv = SelectedValue(x);
aaa = LinRegIntercept(mm, per); bbb = LinRegSlope(mm, per);
daa = SelectedValue(ValueWhen(x, aaa, 1)); dbb = SelectedValue(ValueWhen(x, bbb, 1));
xx =
IIf(x > selv - per
AND x <= selv, x
- (selv - per),Null); yy = daa + dbb * xx;
dhh = abs(H - yy); dll =
abs(L - yy); dtt = Max(dhh,dll);
wd = SelectedValue(HHV(dtt,per));
Buy = Ref(L,-1) == Ref(yy - wd, -1) AND Ref(selv == x,-1); BuyPrice = O; Short = Ref(H,-1) == Ref(yy + wd, -1) AND Ref(selv == x,-1); ShortPrice = O;
Plot(C,"",colorWhite,64); Plot(yy, "LinReg", colorBlue ); Plot(yy + wd, "Upper Boundary", colorRed, 4 ); Plot(yy - wd, "Lower Boundary", colorBrightGreen, 4 );
// shading Plot(yy - wd, "Lower Boundary", colorBlack, 16384 ); Plot(yy + wd, "Lower Boundary", colorWhite, 16384 );
PlotShapes(IIf(Buy,shapeUpArrow,0),colorWhite, layer = 0, yposition = BuyPrice, offset = 0 ); PlotShapes(IIf(Short,shapeHollowDownArrow,0),colorLightBlue, layer = 0,
yposition = ShortPrice, offset = 0
);
----- Original Message -----
Sent: Saturday, June 04, 2005 5:29
PM
Subject: [amibroker] Area between
Is it possible to produce a code that draws
stylehistogram or stylearea only between two curves? My thought is a bit
fuzzy, but it seems if the Y axis could be converted into an array then it
might be possible to utilize stylenodraw in sections where the area should not
be filled in. Sound crazy? If not, any thoughts about how this
might be done?
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
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
|