Problem to add border color to my rectangle

 

Hello,

I have two questions, the first one is :

I would like to create a rectangle with border color but the thing I coded didn't work.

I would like a yellow border color for example.

and The second question is : is there is a way to set the rectangle always on the foreground ? Because my EA draw horizontales lines and they are always on top of the rectangle and I would like the opposite??

here is my code


   ObjectCreate(0, "objectBackgroundName", OBJ_RECTANGLE_LABEL, 0, 0, 0);

   ObjectSetInteger(0, "objectBackgroundName", OBJPROP_XDISTANCE, 20);

   ObjectSetInteger(0, "objectBackgroundName", OBJPROP_YDISTANCE, 20);

   ObjectSetInteger(0, "objectBackgroundName", OBJPROP_XSIZE, 200);

   ObjectSetInteger(0, "objectBackgroundName", OBJPROP_YSIZE, 350);

   ObjectSetInteger(0, "objectBackgroundName", OBJPROP_BGCOLOR, clrBlack);

   ObjectSetInteger(0, "objectBackgroundName", OBJPROP_BORDER_COLOR, clrYellow);

   ObjectSetInteger(0, "objectBackgroundName", OBJPROP_BORDER_TYPE, BORDER_FLAT);

   ObjectSetInteger(0, "objectBackgroundName", OBJPROP_WIDTH, 0);

   ObjectSetInteger(0, "objectBackgroundName", OBJPROP_BACK, false);

   ObjectSetInteger(0, "objectBackgroundName", OBJPROP_SELECTABLE, false);

   ObjectSetInteger(0, "objectBackgroundName", OBJPROP_HIDDEN, true); 



THANK YOU !

   

Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Object Types
Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Object Types
  • www.mql5.com
Object Types - Objects Constants - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5