How do I center vertical text?

 

How do I center vertical text?

I have some code in MQL4 which displays text vertically but the text is not displayed directlly above the candle.  The down arrow displays directly above the candle.

How do I shift the text horizontally?

Also, How do I move the text left, center and right vertically?

ObjectCreate(PatternText[shift], OBJ_TEXT, 0, Time[shift1], High[shift1] + Range*1.5);
ObjectSetText(PatternText[shift], "Bearish Engulfing", 10, "Times New Roman", Red);
ObjectSet(PatternText[shift], OBJPROP_ANGLE, 270);  
downArrow[shift1] = High[shift1] + Range*0.5;

Bob

 
Barcode:

How do I center vertical text?

I have some code in MQL4 which displays text vertically but the text is not displayed directlly above the candle.  The down arrow displays directly above the candle.

How do I shift the text horizontally?

<CODE REMOVED>


Please edit your post . . .    please use the   SRC   button to post code: How to use the   SRC   button.
 
Code displayed properly. Sorry about that
 
Barcode:
Code displayed properly. Sorry about that

Thank you.

Try to do manually what you need to do with code in an MT4 Terminal.  If you can't do it manually then you most likely can't do it through code.  I think what you need is a center vertical align option for the text and that doesn't exist. 

 
Barcode:

How do I center vertical text?

I have some code in MQL4 which displays text vertically but the text is not displayed directlly above the candle.  The down arrow displays directly above the candle.

How do I shift the text horizontally?

Also, How do I move the text left, center and right vertically?

Bob

From   News events and market times on your chart (Author: deVries
         if (showLineText)
         {
            if(Period() < PERIOD_H4)
            {
               ObjectCreate("NewsText"+i, OBJ_TEXT, 0, current, WindowPriceMin()+(WindowPriceMax()-WindowPriceMin())*0.8 );
               ObjectSet("NewsText"+i, OBJPROP_COLOR, clr);
               ObjectSet("NewsText"+i, OBJPROP_ANGLE, 90);   //vertical
               ObjectSetText("NewsText"+i, news[i][COLUMN_DATE] + " " + news[i][COLUMN_DESCRIPTION] + " " + text, 8);
            }
         }  

  current   placing at barnumber  like Time[4];

   WindowPriceMin()+(WindowPriceMax()-WindowPriceMin())*0.8   point where to start vertical line      

 
Thanks fellas, it looks like it can't do exactly what I want.
Reason: