ObjectSetText()

 
I would like to display text vertically using font "Terminal" (as each of it's characters are of the same width) so that my function can calculate where best to display the text, but my trials have not been successfull. If font "Terminal" at angle 90 display can not be used then a conversion function StringToPrice(sSymbol, iPeriod) would be appreciated so as to anchor the text vertically. Thanking you in advance.

//+------------------------------------------------------------------+
//|                                            TestObjectSetText.mq4 |
//+------------------------------------------------------------------+
#property indicator_chart_window

int init()
  {
   return(0);
  }

int deinit() {
  int iObj;
  while(ObjectFind("o"+iObj) >= 0) {
    ObjectDelete("o"+iObj);
    iObj++;
  }
  return(0);
}

int start() {
  int i;
  
  // angle of text is not respected by MT4, font is respected
  i=45;
  ObjectCreate("o0", OBJ_TEXT, 0, Time[i], iHigh(NULL, 0, i));
  ObjectSetText("o0", "Angle=180 in lieu of 90, Font=Terminal (OK)", 20, "Terminal", White);          
  ObjectSet("o0", OBJPROP_ANGLE, 90);
  
  // angle of text is not respected by MT4, font is respected
  i=25;
  ObjectCreate("o1", OBJ_TEXT, 0, Time[i], iHigh(NULL, 0, i));
  ObjectSetText("o1", "Angle=180 in lieu of 90, Font=Terminal (OK)", 10, "Terminal", White);          
  ObjectSet("o1", OBJPROP_ANGLE, 90);
  
  // angle of text is respected by MT4, font defaults to Arial
  i=1;
  ObjectCreate("o2", OBJ_TEXT, 0, Time[i], iHigh(NULL, 0, i));
  ObjectSet("o2", OBJPROP_COLOR, White);
  ObjectSetText("o2", "Angle=90 (OK), Font=Arial in lieu of Terminal");          
  ObjectSet("o2", OBJPROP_ANGLE, 90);
  
  return(0);
}
//+------------------------------------------------------------------+
 
Oops! conversion function to please be StringToPrice(sSymbol, iPeriod, iStringLen). Or alternatively could you give me a factor for font "Arial" font size 9 for average of 27 characters in length. Thanking you in advance.
 
Not in this platform. Sorry.

Your problem is clear. Text object should have anchor property.