What is the difference between OBJ_RECTANGLE_LABEL and OBJ_RECTANGLE?

 

I do not understand the purpose of creating these two types of rectangles:  OBJ_RECTANGLE_LABEL and OBJ_RECTANGLE

Ultimately they look similar. The  OBJ_RECTANGLE_LABEL does not even give a preference to write text on it, how is that a label?

 OBJ_RECTANGLE_LABEL and OBJ_RECTANGLE are simply the same then why they are two difference objects?

Please someone explain me.

 

Rectangle is anchored by time/price

The label by pixel co-ordinates.

 

Your reply is good. But not convincing. Why is there a need for two different objects. Only the difference of Anchor then it is not making sense.

What is the need to place one object by time/price and other by pixel co-ordinate? Doesn't make any sense to me. Can you explain the difference?

 
It is convincing as it are the facts. Pick the one that suits your needs.
 
jaffer wilson:

Your reply is good. But not convincing. Why is there a need for two different objects. Only the difference of Anchor then it is not making sense.

What is the need to place one object by time/price and other by pixel co-ordinate? Doesn't make any sense to me. Can you explain the difference?

As the chart moves, a time/price object will move with it.

 
jaffer wilson:

Your reply is good. But not convincing. Why is there a need for two different objects. Only the difference of Anchor then it is not making sense.

What is the need to place one object by time/price and other by pixel co-ordinate? Doesn't make any sense to me. Can you explain the difference?

If you want an object that always is displayed on the chart  at the same place, not attached to a specific price - use anchor by pixel.
If you want an object that is displayed attached to a time/price and displayed only when the time/price is shown on the chart and attached and moves with it - use anchor to time/price.

 

Yes totally agree with the answers here. But if I need to fix or move an object with time, I can still use the Rectangle object. The label object is not even having the text displaying property. I tried to incorporate the ability to display text using property but it did not have one. 

Hence, OBJ_RECTANGLE would be sufficient.

But may be the MetaQuotes team have something different in mind, I guess.

Anyways Thank you for your wonderful replies.

 
I use OBJ_RECTANGLE_LABEL as a background for other objects if I need one, a panel for example.
 
Keith Watford #:
I use OBJ_RECTANGLE_LABEL as a background for other objects if I need one, a panel for example.

Is there a way to get prices from OBJ_RECTANGLE_LABEL?

Just need confirmation of my bias that it should not be possible.

 
Anil Varma #:

Is there a way to get prices from OBJ_RECTANGLE_LABEL?

Just need confirmation of my bias that it should not be possible.

Perhaps you should read the manual. ChartXYToTimePrice - Chart Operations - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
   How To Ask Questions The Smart Way. (2004)
      How To Interpret Answers.
         RTFM and STFW: How To Tell You've Seriously Screwed Up.

Reason: