How to display info in right part of a chart?

 

When we use Chart Shift, there will be a space in right part of a chart. It seems that many tool display info here. Most of the functions are developed by Objects. But, to deal with objects in MQL4, there are so many functions and some of them has the same results. E.g, shiould I use OBJ_RECTANGLE_LABEL or not, should I use OBJ_TEXT or should I use ResourceCreate combined with TextOut? Can somebody give me an example for displaying information in this area that use most standerd methods? Thank you very much!

 

 

You can:

ObjectCreate("_LABEL_", OBJ_LABEL, 0, 0, 0);
ObjectSetInteger(0,"_LABEL_",OBJPROP_CORNER,CORNER_RIGHT_UPPER);
ObjectSetInteger(0,"_LABEL_",OBJPROP_ANCHOR,ANCHOR_RIGHT_UPPER);
ObjectSetInteger(0,"_LABEL_",OBJPROP_SELECTABLE,0);
ObjectSetInteger(0,"_LABEL_",OBJPROP_XDISTANCE,10); 
ObjectSetInteger(0,"_LABEL_",OBJPROP_YDISTANCE,30);
 
Fillellin:

You can:

Thank you! But, what's the differnce between OBJ_LABEL and OBJ_TEXT? ;)
 
aforexpert:
Thank you! But, what's the differnce between OBJ_LABEL and OBJ_TEXT? ;)
A label object will be fixed at a certain screen coordinate. Even if you scroll the screen, it will remain at that spot. A text object will scroll with the price chart. Think of it like Label stays at an X/Y screen coordinate, text is pinned to a price coordinate (price/time). Try it yourself with the label and text objects on the menu bar.
 
Filter:
A label object will be fixed at a certain screen coordinate. Even if you scroll the screen, it will remain at that spot. A text object will scroll with the price chart. Think of it like Label stays at an X/Y screen coordinate, text is pinned to a price coordinate (price/time). Try it yourself with the label and text objects on the menu bar.
Thank U very much!
 
aforexpert:
Thank U very much!
Very welcome :)
 
Alexander Voronkov #:

You can:

Thanks a lot for that!! ❤

Reason: