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.
First you need to decide wether you have a text object or a label object.
- Text objects are attached to a bar and have ObjectSetInteger OBJPROP_ANCHOR ENUM_ANCHOR_POINT
- 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.
- Text objects are attached to a bar and have ObjectSetInteger OBJPROP_ANCHOR ENUM_ANCHOR_POINT
- 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.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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