John,
I'm not an afl expert, but think you will need to use a loop.
Ex:

Z=BarIndex()-LastValue(BarIndex())-n>0;
for (i=0; i<Barcount; i++)   //you may want to start loop at later bar
{
if (z[i]==0)
{
do this
}
else
{
do that
}
}

Dan

--- In [email protected], "John Bollinger" <[EMAIL PROTECTED]> wrote:
>
> 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
>


Reply via email to