Unable to add tooltip to OBJ_RECTANGLE object created with ObjectCreate

 
    if(!ObjectCreate(0,"Candle"+IntegerToString(i),OBJ_RECTANGLE,0,candleStructure.mtime + multiplier,candleStructure.mopen,candleStructure.mtime + multiplier + 600,candleStructure.mclose))
           Print(__FUNCTION__,
              ": failed to create candle body! Error code = ",GetLastError());
     else
     {
     
         ObjectSetInteger(0,"Candle1",OBJPROP_COLOR,(isBull()) ? clrGreen : clrRed);
         ObjectSetInteger(0,"Candle1",OBJPROP_BACK,true);
         ObjectSetInteger(0,"Candle1",OBJPROP_FILL,true);
        ObjectSetInteger(0,"Candle1",OBJPROP_TOOLTIP, "My Rectangle"); // Got error on this line..
         
     }

I created 3 objects via ObjectCreate  - two OBJ_TREND and one OBJ_RECTANGLE.

When I coded them to display tooltip, the two OBJ_TREND objects worked fine. However, the code for the OBJ_RECTANGLE, although exactly identical does not compile.

I got the compiler message below:

'ObjectSetInteger' - no one of the overloads can be applied to the function call Utilities.mqh 1245 9

I inserted the code here and indicated the line that does not compile in the code.

Can anyone help me out - to get the code to compile? Or if someone cand tell me another way to set the tooltip for OBJ_RECTANGLE object.

I am also curious why same identical code works for OBJ_TREND but does not work for OBJ_RECTANGLE



 

Issue fixed...

I should have used ObjectSetString(...) instead of ObjectSetInteger(....) 

Cut and Paste error...

Cut and paste continues to be a leading cause of error in programmming... but we also can't do without it!