First you have to find the right function.  

mycondition = Cross(shortMA,longMA); 

Buycondition = Sum(mycondition,20); 

Buy = Buycondition >= 3; 

Hope this helps

JOE 

  ----- Original Message ----- 
  From: Raajesh Jariwala 
  To: [email protected] 
  Sent: Monday, September 17, 2007 6:33 AM
  Subject: [amibroker] Request for AFL Help


  Hello Friends,

  I have a condition defined.

  I wish to trigger a buy if this condition is true three times in the
  last 20 bars...

  How do I go about writing the same.

  Please help.....

  Regards,

  Raajesh



   

Reply via email to