Text alignment cannot be changed, sorry
If there is no "alignment" functionality, is there a way for EA to know the zoom level?
ie, if the chart is fully zoomed out, then I can set the text be printed at Time[20]. and if the chart is fully zoomed in, then I can set the text be printed at Time[5].. etc
can it be detected at all?
ie, if the chart is fully zoomed out, then I can set the text be printed at Time[20]. and if the chart is fully zoomed in, then I can set the text be printed at Time[5].. etc
can it be detected at all?
Try creating an OBJ_LABEL instead of OBJ_TEXT.
The labels have anchor points that are x-y coordinates of the screens pixels, and they will stay in the same relative position regardless of how the chart is zoomed.
BTW, I really wish that I could right align the descriptions of OBJ_LABEL objects.
Christian
The labels have anchor points that are x-y coordinates of the screens pixels, and they will stay in the same relative position regardless of how the chart is zoomed.
BTW, I really wish that I could right align the descriptions of OBJ_LABEL objects.
Christian
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
ObjectCreate(objName, OBJ_TEXT, 0, Time[10], Ask);
ObjectSetText(objName, "a very long statement about forex trading", 12, "Arial", EMPTY);
ObjectSet(objName, OBJPROP_COLOR, Yellow);
Question is, if the statement is very long, It will not completely show up as part of it will be out of screen.
Currently, I am trying to display it at Time[10].. But if the user decided to Zoom in, the text will then be displayed to the left side..
Is there a way to "Right Align" the text so that regardless of zoom factor, it will always show the whole statement perpectly on the screen?