Thanks for responding Graham. I solved it in a roundabout manner with the following code:
x=Osc>0; OscLPV=ValueWhen(Cross(0,osc),Ref(Osc,-1),1); pstv_osc=IIf(x,Osc,Osclpv); Regards R On 12/24/06, Graham <[EMAIL PROTECTED]> wrote:
lastvalue gives the last value in the whole chart just remove the lastvalue part -- Cheers Graham AB-Write >< Professional AFL Writing Service Yes, I write AFL code to your requirements http://www.aflwriting.com On 24/12/06, Rakesh Sahgal <[EMAIL PROTECTED]> wrote: > > Is the following the correct manner in which to record the LAST > POSITIVE value of an oscillator before the value becomes negative? > > > x=Osc>0; > > OscLPV=ValueWhen(x,LastValue(Osc),1); > > pstv_osc_val=IIf(x,Osc,Osclpv); > > > TIA for any help in correcting the above. > > Regards > > > R >
