This may not be exactly what you're looking for, but it does show how to plot a
vertical line "n" bars to the left of the last bar.
Hope this helps..
Lal
----------
N = Param("Bars away from end", 5, 0, 100, 1);
AtNBar = BarIndex() == LastValue(BarIndex() - N); // are we at Nth bar
from the last?
Plot(AtNBar,"", colorRed, styleHistogram| styleOwnScale, Null, Null) ; // Plot
vertical line, N bars to left of last bar
-----------
----- Original Message ----
From: John Bollinger <[EMAIL PROTECTED]>
To: [email protected]
Sent: Friday, 25 July, 2008 7:56:56 PM
Subject: [amibroker] Getting near the end
Hello,
I'd like to change a calculation as I get within n periods of the end
of an array in real time.
if (BarIndex() <= LastValue(BarIndex) - n)
do this;
else
do that;
The above has problems as it compares an arrray to a number.
I've tried SelectedValue( BarIndex( )).
TIA,
jab
__________________________________________________________
Not happy with your email address?.
Get the one you really want - millions of new email addresses available now at
Yahoo! http://uk.docs.yahoo.com/ymail/new.html