If you want to delay based on bars in the actual test period you have
selected, then maybe something like this might work
Buy = OtherBuyConditions and
IIf(Status("action")>2,Cum(Status("barinrange"))>150,1);If you just want to make sure there are 150 bars at the start of the symbol history then Buy = OtherBuyConditions and BarIndex()>150; -- Cheers Graham Kav AFL Writing Service http://www.aflwriting.com On 07/04/2008, furinkazaan <[EMAIL PROTECTED]> wrote: > > Hi, > I resend this mail since i dont see it on the forum. Pl excuse the > duplication, if any. I appreciate any help. thanks. > best, > kazaan > > ---------- Forwarded message ---------- > From: furinkazaan <[EMAIL PROTECTED]> > Date: 2 Apr 2008 21:41 > Subject: Delay first BUY signal by x bars > To: [email protected] > > Hi, > if Buy= cross(ema(c, 15), ema(c,50)) > then it is recommended that no signals be taken till (as a thumb rule) - > Largest EMA * 3 periods > In this case how do instruct to postpone taking the first BUY signal till > 50*3 =150 bars from the befining of test period? > > Do I do something like - iff(barindex() <=300, buy=0, buy) ?? > > Sorry if the code looks clunky - I am an absolute rookie and I have just > written my first system AFL today. Still figuring if it works the way i > intended it to! B-). But Amibroker rocks! > TIA > -- > regards, > kazaan >
