How to get the position of highest or lowest point of Indicator? - page 2

 
Thread start date - 2010.08.31
 

Hello

I am trying to use the code above, to get the index bar, but it gives me 0 all the time. Is there anybody who can tell me what is wrong into this code ?

Thank you by advance

 

int      theLowestBar;
double   laLowest;

   for(int k = 0; k <= 96; k++){
   double   LowestBar;

      LowestBar  = iBars   (NULL,0);
      if( LowestBar < laLowest ){
         laLowest  = LowestBar;
         theLowestBar      = k;
      }