ihigh - ilow command some issue

 
for(int j=2; j<20; j++)
     { 
      if(iHigh( "USDCHF" , PERIOD_H1 ,j)-iLow( "USDCHF" , PERIOD_H1 ,j)>=200*Point)
        {
         K=j;
         return true;

         break;


i want to detect only buy or sell candle at a time.

what additional setting i do for it

Reason: