try this Buy = Cross( C, ref( HHV(H,10), -1 ) );
-- Cheers Graham AB-Write >< Professional AFL Writing Service Yes, I write AFL code to your requirements http://www.aflwriting.com On 05/04/07, Prashanth <[EMAIL PROTECTED]> wrote: > > > Hello, > > > > Buy = Cross(C,HHV(H,Ref(H,10))); > > Sell = Cross(C,LLV(L,Ref(L,10))); > I am using Low for Sell instead of High as requested by you. > > Cheers > > Prashanth > > > ----- Original Message ----- > From: infynhome > To: [email protected] > Sent: Thursday, April 05, 2007 8:27 PM > Subject: [amibroker] HHV and LLV of 10,20 and 30 days - Breakout AFL help > > > > > Hello, > > I need to backtest the following system: > > Buy when price moves above HHV of the last 10 trading sessions. > Sell when price move below the HHV of the last 10 trading sessions. > > Regards > Mithil Pradhan >
