A very simple "Label on chart" code is giving me an error

 

I just want a simple line of text presented at the top middle of the screen. I found some tutorial through youtube and tried to make it work, but it gives me an error.

'ObjectSetInteger' - some operator expected, in line 16 ("//Set Distance from left Border")


I don't know what operator is missing. Can anyone help?


It might be language for MT4, but it wasn't mentioned in the video. I need MT5.


void OnTick()
  {
   // Set Object Properties for a Label
   ObjectCreate(0,"Label1",OBJ_LABEL,0,0,0);
   
   //Set Object Font
   ObjectSetString(0,"Label1",OBJPROP_FONT,"Calibri Bold");
   
   //Set Font Size
   ObjectSetInteger(0,"Label1", OBJPROP_FONTSIZE,11);
   
   //Set Label Text
   ObjectSetString(0,"Label1",OBJPROP_TEXT,"HELLO WORLD")
   
   //Set Distance from left Border
   ObjectSetInteger(0,"Label1",OBJPROP_XDISTANCE,670);
   
   //Set Distance from upper Border
   ObjectSetInteger(0,"Label1",OBJPROP_YDISTANCE,0);
   
  }

 
ObjectSetString(0,"Label1",OBJPROP_TEXT,"HELLO WORLD")ObjectSetInteger(0,"Label1",OBJPROP_XDISTANCE,670);
What do you think that means to the compiler?
 
William Roeder #:
What do you think that means to the compiler?

Oh my god, how could I not see this.

It now works flawlessly.


Thank you:)

 
8977737 #: Oh my god, how could I not see this.

It's much harder to see that which is not there ;)