can anyone help tp modify this indicator

 
//+------------------------------------------------------------------+
//|                                              mn Period Boxess    +                
//+------------------------------------------------------------------+

#property indicator_chart_window
#property copyright "mn"

extern int   mNmbOfBoxes = 10, mWidth = 2;
extern color mCol1 = Blue;   
extern bool  mFilledBox = false;      
extern int   mPeriod = 10080;   // 43200, 10080, 1440, 240
            
double mData[][6];
int mTime, mArrSize;   
//-------------------------------------------------------- 
int init()
  {
   ArrayCopyRates(mData, Symbol(), mPeriod);
   mArrSize = ArraySize(mData);
   
   return(0);
  }
  
//-------------------------------------------------------- 
int deinit()
  {
   DeleteObjects();

   return(0);
  }

//--------------------------------------------------------- 
int start()
 {
  if(Time[0] > mTime)
  {
   DeleteObjects();
   for(int i = mArrSize; i >= 0; i--)
    {
     mDrawBoxes(i);
    }
    mTime = Time[0];
   }

   return(0);
}

//--------------------------------------------------------
void mDrawBoxes(int j)
 {
  int mT1Adj = 0, mPrdOpen;

  if(j <= mNmbOfBoxes)
   {
     mPrdOpen = mData[j][0];
    if(mPeriod > 1000)
       {
        while((TimeDayOfWeek(mPrdOpen) == 6 || TimeDayOfWeek(mPrdOpen) == 0))
          mPrdOpen += (Period() * 60);
       }
 
     ObjectSet("mBox"+(j+1), OBJPROP_TIME2, mPrdOpen);
     ObjectCreate("mBox"+j, OBJ_RECTANGLE, 0, 0, 0, 0);
     ObjectSet("mBox"+j, OBJPROP_PRICE1, mData[j][3]);
     ObjectSet("mBox"+j, OBJPROP_PRICE2, mData[j][2]);
     ObjectSet("mBox"+j, OBJPROP_TIME1, mPrdOpen;
     if(j > 0)
       ObjectSet("mBox"+j, OBJPROP_TIME2, mData[j-1][0]);
     else
       ObjectSet("mBox"+j, OBJPROP_TIME2, Time[0]);
     ObjectSet("mBox"+j, OBJPROP_COLOR, mCol1);
     ObjectSet("mBox"+j, OBJPROP_WIDTH, mWidth);
     if(mFilledBox)
       ObjectSet("mBox"+j, OBJPROP_BACK, true);
     else
       ObjectSet("mBox"+j, OBJPROP_BACK, false);
   }
     
   return(0);
 }
 
//--------------------------------------------------------
void DeleteObjects()
 {
   string mObj;
   for(int m = ObjectsTotal()-1; m >= 0; m--)
    {
      mObj = ObjectName(m);
      if (StringFind(mObj,"mBox", 0) > -1)
       ObjectDelete(mObj);
    }
  }
//+------------------------------------------------------------------+

Hi,
Here is a indicator that draws rectangle that encompass the high and low of the period set in the parameters.
But it draws it from the 00h00 of the broker time.
Would it be possible to modify it and add a start day of week option and a start time option
So It will be possible to have boxes drawn from any day of week and time.

Thank you very much
Gerald
Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Symbol Properties
Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Symbol Properties
  • www.mql5.com
To obtain the current market information there are several functions: SymbolInfoInteger(), SymbolInfoDouble() and SymbolInfoString(). The first parameter is the symbol name, the values of the second function parameter can be one of the identifiers of ENUM_SYMBOL_INFO_INTEGER, ENUM_SYMBOL_INFO_DOUBLE and ENUM_SYMBOL_INFO_STRING. Some symbols...
Files:
 
  1. yes.
         How To Ask Questions The Smart Way. 2004
              Only ask questions with yes/no answers if you want "yes" or "no" as the answer.

  2. Yes
  3. Help you with what? You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your problem.
              No free help 2017.04.21

 
William Roeder:
  1. yes.
         How To Ask Questions The Smart Way. 2004
              Only ask questions with yes/no answers if you want "yes" or "no" as the answer.

  2. Yes
  3. Help you with what? You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your problem.
              No free help 2017.04.21

 As I am not a proficient coder I can see that I wont get help from anyone in this forum,

Please admin delete this thread.

Thank you
Reason: