Text Object hidden

 

Hi guys,

i want to show a text object in the left corner of the chart window but with this code a can never see a text object.

What is wrong? I can't find the right solution by myself.

int init()
  {
  ObjectCreate("Text1", OBJ_TEXT, 0, 0, 0);
  ObjectSet("Text1", OBJPROP_XDISTANCE, 200);
  ObjectSet("Text1", OBJPROP_YDISTANCE, 100);
  ObjectSetText("Text1", "Hello world!", 100, "Times New Roman", Green);
  }
 

 Find your solution ......    clock displaying time in main chart

 
FamWue:

Hi guys,

i want to show a text object in the left corner of the chart window but with this code a can never see a text object.

What is wrong? I can't find the right solution by myself.

Read some of the other recent posts in this forum

https://www.mql5.com/en/forum/143612

OBJ_TEXT uses price and time coordinates,  OBJ_LABEL uses pixel coordinates. 

 
Thx a lot.
Reason: