Hi Roberto
Here's a clip from one of my indicators that you may be able to use. This can
be compressed in fewer lines
of code by nesting the functions but it was done this way for readability.
Note that as long as the barindicator BIX is in the range it will develop a
value for YY.
JOE
Daysback = Param("DysBack",126,10,252,1);
LastBar = BarCount-1;
FirstBar = LastBar - DaysBack;
BI = BarIndex();
BIX = IIf(BI >= Firstbar,1,0);
Y = LastValue(Close);
YY = IIf(BIX>0, y, Null); // plot only from days back to last bar
Plot(yy,"LastClose",colorRed,styleThick);
Plot(Close,"Close",colorBlack,styleCandle);
----- Original Message -----
From: Roberto Martinez
To: [email protected]
Sent: Saturday, August 25, 2007 6:07 AM
Subject: [amibroker] horizontal line
Hi there,
I would like to know how to programatically draw a horizontal line that last
for x bars and not for all the chart. When I use the PLOT function it draws a
line trough all the chart length.
Tia.