Please help to detect highest or lowest of bars

 
   int _start=0;
   int no_of_bars=5;
   double price_high = iHigh(Symbol(), Period(), iHighest(Symbol(), Period(), MODE_HIGH, no_of_bars, _start ) );
   double price_low = iLow(Symbol(), Period(), iLowest(Symbol(), Period(), MODE_LOW, no_of_bars, _start ) );
 
szgy74:



It works. Thank you so much ^^
 
tvh168: As the title, can anyone help me? I tried to code, but it not work. :(
  1. Why didn't you post your code, so you would learn?
  2.    int _start=0;
       int no_of_bars=5;
       int iHH = iHighest(NULL,0, MODE_HIGH, no_of_bars, _start),
           iLL =  iLowest(NULL,0, MODE_LOW,  no_of_bars, _start);
       double price_high = High[iHH]; // Don't use unnecessary function calls
       double price_low  =  Low[iLL]; // when you have direct access.

 
   double price_high = High[iHH]; // Don't use unnecessary function calls
   double price_low  =  Low[iLL]; // when you have direct access.

I replaced my variables with Symbol(), Period(), I use this in my multipair-multisymbol functions.