Alguien me podria hechar una mano?

 

Tengo este indicador que me marca los high y low de la hora que yo indique pero dibuja 2 lineas obviamente una es low y otra es high quisiera que se creara un rectangulo entre esas lineas desde el high al low se cree un rectangulo muchas gracias quien pueda hecharme una mano les dejo el codigo gracias!



//+------------------------------------------------------------------+
//|                                                    MU.mq4 |
//|                                                 Copyright © 2020 |
//|                                        |
//+------------------------------------------------------------------+
#property copyright ""
#property link      ""
#property description "" 
#property description "        "
#property description "()"
#property description "        "
#property description "()"
#property icon "iconoo.ico"
#property indicator_chart_window

#property indicator_buffers 2
#property indicator_color1 PaleGreen
#property indicator_color2 Red

extern int StartHour=15;
extern int EndHour=23;



double UpperCh[], LowerCh[];

int init()
  {
   IndicatorDigits(Digits);
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,UpperCh);
   SetIndexStyle(1,DRAW_LINE);
   SetIndexBuffer(1,LowerCh);

   return(0);
  }

int deinit()
  {
   
   return(0);
  }
  
int start()
  {
   if(Bars<=3) return(0);
   int ExtCountedBars=IndicatorCounted();
   if (ExtCountedBars<0) return(-1);
   int    pos=Bars-2;
   if(ExtCountedBars>2) pos=Bars-ExtCountedBars-1;
   while(pos>0)
     {
      datetime EndTime=StrToTime(TimeToStr(Time[pos],TIME_DATE)+" "+DoubleToStr(EndHour,0)+":00");
      if (Time[pos]>=EndTime && Time[pos+1]<EndTime)
      {
       double MaxPrice=High[pos];
       double MinPrice=Low[pos];
       datetime StartTime=StrToTime(TimeToStr(Time[pos],TIME_DATE)+" "+DoubleToStr(StartHour,0)+":00");
       if (StartHour>EndHour) StartTime=StartTime-86400;
       int pos_=pos;
       while (pos_<Bars && Time[pos_]>=StartTime)
       {
        MinPrice=MathMin(MinPrice, Low[pos_]);
        MaxPrice=MathMax(MaxPrice, High[pos_]);
        pos_++;
       }
       int i;
       for (i=pos_-1;i>=pos;i--)
       {
        UpperCh[i]=MaxPrice;
        LowerCh[i]=MinPrice;
       }
       if (pos!=pos_-1)
       {
        string ObjName="ChannelSizeLabel "+TimeToStr(Time[pos],TIME_DATE);
        
        if (ObjectFind(ObjName)==-1)
        {
         
        }
        else
        {
         ObjectSet(ObjName,OBJPROP_PRICE1,MinPrice);
        } 
        
       } 
      }
      else
      {
       UpperCh[pos]=EMPTY_VALUE;
       LowerCh[pos]=EMPTY_VALUE;
      }
      pos--;
     }

   return(0);
  }
 
OBJ_RECTANGLE - Object Types - Objects Constants - Constants, Enumerations and Structures - MQL4 Reference
OBJ_RECTANGLE - Object Types - Objects Constants - Constants, Enumerations and Structures - MQL4 Reference
  • docs.mql4.com
The following script creates and moves the rectangle on the chart. Special functions have been developed to create and change graphical object's properties. You can use these functions "as is" in your own applications. //| Create rectangle by the given coordinates                        |               time1=0,           ...