Return monday range but starting from 3am

 
So i made a strategy wich uses data gathered by me manually , and for this i need my EA to calculate on tuesday morning (3am ) my monday range (high-low) but doing this taking into consideration only the candles printed starting from 3 am (server time) , i tried doing this using a static value by taking the time at wich the market opens and adding seconds until it's 3am , and that being my monday start , and monday end being monday start + the rest of the hours but divided to seconds (usually 21) my problem is that somethimes the trading day ends at 21:00 instead on 23:59 and that makes my Ea calculate the wrong value ? any idea how can i do this batter? i will post my function here . Thanks!!
void CalculateMondayRange()
{
if(!mondayClasicCalculation){
   datetime mondayStart = iTime(Symbol(), PERIOD_D1, 1)+7200; // Start of Monday (2 days back from Wednesday)
   datetime mondayEnd = mondayStart + 75600; // 86400 seconds in a day

   int startBar = iBarShift(Symbol(), PERIOD_M1, mondayStart, false);
   int endBar = iBarShift(Symbol(), PERIOD_M1, mondayEnd, false);

   MondayHigh = iHigh(Symbol(), PERIOD_M1, iHighest(Symbol(), PERIOD_M1, MODE_HIGH, startBar - endBar, 0));
   MondayLow = iLow(Symbol(), PERIOD_M1, iLowest(Symbol(), PERIOD_M1, MODE_LOW, startBar - endBar, 0));
   MondayRange = (MondayHigh - MondayLow); // Convert to points
   MondayRange = NormalizeDouble(MondayRange,_Digits);

   }else{   // Here we assume mondayBar corresponds to Monday's bar on the daily chart
   MondayHigh = iHigh(Symbol(), PERIOD_D1, 1);
   MondayLow = iLow(Symbol(), PERIOD_D1, 1);

   // Calculate range in points
   MondayRange = (MondayHigh - MondayLow);
   MondayRange = NormalizeDouble(MondayRange,_Digits);}
   
   }