MQL4 object positioning problem with pixel coordinates on the chart window (in mt4)

 

Hi all guys, I have a problem in mql4. 

I create objects (labels and buttons) to display on a graph by specifying anchoring and coordinates in pixels. 

Unfortunately, however, in some MT4s the position of the object is not correct, it overlaps with other objects, while in other MT4s you see everything regularly.  this doesn't seem to be affected by the coordinate scale of the graphs or the screen resolution, I don't know what to do.  I leave a portion of code to show how I create and impose the positioning coordinates. 

   
//Object creation
   ObjectCreate("Label_Name",OBJ_LABEL,0,0,0);
   
    //Settings
    ObjectSetInteger(ChartID(),"Label_Name",OBJPROP_CORNER,CORNER_LEFT_UPPER); //-- Anchor corner
    ObjectSetInteger(ChartID(),"Label_Name",OBJPROP_XDISTANCE,100); //-- X coordinate
    ObjectSetInteger(ChartID(),"Label_Name",OBJPROP_YDISTANCE,65); //-- Y coordinate
    ObjectSetString(ChartID(),"Label_Name",OBJPROP_FONT,"Arial"); //-- Font
    ObjectSetInteger(ChartID(),"Label_Name",OBJPROP_FONTSIZE,10); //-- Text size
    ObjectSetInteger(ChartID(),"Label_Name",OBJPROP_COLOR,clrWhite); //-- Text color
    ObjectSetInteger(ChartID(),"Label_Name",OBJPROP_READONLY, true); //-- Uneditable
    ObjectSetInteger(ChartID(),"Label_Name",OBJPROP_SELECTABLE,false); //-- Not selectable
    ObjectSetString(ChartID(),"Label_Name",OBJPROP_TEXT,"My text"); //-- Label text


Thanks in advance to anyone who will answer. 🙏🙏🙏

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
 
Matteo Ceccarelli: , I don't know what to do.
    ObjectSetInteger(ChartID(),"Label_Name",OBJPROP_XDISTANCE,100); //-- X coordinate
    ObjectSetInteger(ChartID(),"Label_Name",OBJPROP_YDISTANCE,65); //-- Y coordinate

You hard coded the location. Of course, all labels created by that function will overlap.