Draw rectangle each day

 

I am having trouble getting my EA to draw a rectangle, can you please help.


Objective: At a given time each day draw a rectangle between two set times.

I have written the below code, it executes but the rectangle does not seem to ever draw. suggestions?

void OnTick()
  {
  
  //Only run once a day at london open
  if (thisDay != DayOfYear() && LondonOpen = Hour()) {
      thisDay = DayOfYear();
      
      // Hardcoded for this post only.
      double high = 1.1200;
      double low = 1.1100;
            
      string date = TimeToStr(Time[0],TIME_DATE);
      ObjectCreate(ChartID(), "AsiaSession_" + date, OBJ_RECTANGLE, 0, TimeCurrent() - 50000, high, TimeCurrent(), low);
      ObjectSet("AsiaSession_" + date, OBJPROP_FILL, boxColor);
   }
}
 
SE11XU:

I am having trouble getting my EA to draw a rectangle, can you please help.


Objective: At a given time each day draw a rectangle between two set times.

I have written the below code, it executes but the rectangle does not seem to ever draw. suggestions?

Check the return value of ObjectCreate() and debug your code.