If you just want it for the most-recent bar, use LastValue. If it's part of a backtesting system over all bars, you'll need to keep using array maths to use the condition at every bar it occurs.
Regards, GP --- In [email protected], "jamesmarkharmon" <[EMAIL PROTECTED]> wrote: > > newHigh = IIf(H > Ref(H,-i),1,0); > > if(newHigh == 1) > { > //do this > } > > I had a question on how If statements should be done like this without > getting the array error. >
