Dear ami-fans
trying to write a formula to define PEAK as:
the highest of each of the next 3 consecutive bars (counter trend bars) has to be equal or lower then the highest of the peak bar.
actually i am converting "price channel 3 days" @ chartnexus...
the formula i wrote:
PeakCond= ( H>=Ref(H,1) AND H>=Ref(H,2) AND H>=Ref(H,3));
Peak = ValueWhen(PeakCond,H,1);
but it's not correct for the last bar (Last date), since it doesnt have the next bar [(Ref(H,1) and so on)]
any sample script that perform similar program?
Thanks in advance...
Cheers/Agung