change anchor position

 

Hi, I am really interested in how you change the 'anchor point' text labels.

I have some code, would upload but don't yet have the authors permission to upload yet. 

I want to edit the code to place all the text labels on the top right of my charts

Thanks

 

Be careful not to confuse anchor points with chart corners:

   ObjectSetInteger(0, "MyLabelName", OBJPROP_CORNER, CORNER_RIGHT_UPPER);

You then need to set all your X and Y distances relative to that corner.


 
deserttim: I am really interested in how you change the 'anchor point' text labels.

First you need to decide wether you have a text object or a label object.

  1. Text objects are attached to a bar and have ObjectSetInteger OBJPROP_ANCHOR ENUM_ANCHOR_POINT
  2. Label objects are attached to the chart, with pixel distances relative to a corner.
 
whroeder1:

First you need to decide wether you have a text object or a label object.

  1. Text objects are attached to a bar and have ObjectSetInteger OBJPROP_ANCHOR ENUM_ANCHOR_POINT
  2. Label objects are attached to the chart, with pixel distances relative to a corner.


Here we go

"ObjectCreate("lbl_Buy_Pips2", OBJ_LABEL, 0, 0, 0);"

"ObjectSet("lbl_Buy_Pips2", OBJPROP_XDISTANCE, 50);"

"ObjectSet("lbl_Buy_Pips2", OBJPROP_YDISTANCE, 145);"

"ObjectSetText("lbl_Buy_Pips2","",10,font_type,Yellow);"

I would like the tex objects equally spaced but located in the top right hand corner of the screen

 
That is not a text object, that is a label. honest_knave already answered that question.