You need to define your 3bar pattern:
Pattern = your definition;

BarsNumber = Valuewhen(Pattern,barIndex(),1);  // this gives you the bar index 
when pattern is completer


----- Original Message ----- 
  From: TOMSTI 
  To: [email protected] 
  Sent: Tuesday, September 23, 2008 12:05 PM
  Subject: [amibroker] loop vs arrays


  Hello All,

   

  I need to plot a chart that first of all shows 3 bar swing high and swing 
lows. After that, I need to show and mark if a swing made a higher swing than 
the previous swing (or lower). I can do this using a loop and remembering the 
previous swing high or swing low bar, but am wondering if there is any way of 
avoiding a loop and accomplishing the same thing? 

   

  Any thoughts appreciated. I have gone through the archives and the knowledge 
base, but, unless I missed it, I did not find a solution.

   

  Thanks

  Tom

   

   

   

Reply via email to