M15 Fractals prior to a specified time period on M1

 
How can I get the M15 Fractals prior to a specified time period on an M1 chart in MQL4?
I want to get Fractals before a certain time, and below/above a certain price level. How can I achieve this? Thank you for your help.
void fractal()
  {
   g_StartTime_bar = iBarShift(NULL,PERIOD_M15,g_start_Time);
   g_EndTime_bar = iBarShift(NULL,PERIOD_M15,g_end_Time);
   int mode = MODE_UPPER; 
   
   for(int k = 
    0  ; k < Bars ; k--)
     {
      if(
         iFractals(NULL, PERIOD_M15, MODE_UPPER,k)!=0 &&
         iFractals(NULL, PERIOD_M15, MODE_UPPER,k) > 1.0000 &&     
         iTime(NULL, PERIOD_M15, k)!=g_start_Time &&
         iTime(NULL, PERIOD_M15, k)!=g_end_Time)
        {
         gFractals_Upper = iFractals(NULL, PERIOD_M15, mode,k);
        }
     }
  }
 
  1.    for(int k = 
        0  ; k < Bars ; k--)
         {
          if(
             iFractals(NULL, PERIOD_M15, MODE_UPPER,k)!=0

    You are mixing apples and oranges.

  2.          iFractals(NULL, PERIOD_M15, MODE_UPPER,k)!=0 &&
             iFractals(NULL, PERIOD_M15, MODE_UPPER,k) > 1.0000 &&   

    MQL4 uses an empty value of zero, so what is the purpose of two tests?