How do I lock pixel spacing between two textboxes?

 

Hi guys,


This is a screenshot of the Monster Harmonic Indicator by Paul Geirnaerdt. I have 2 questions:


1) How can i fit two textboxes beneath a candle low so they don't squeeze together when i squeeze the chart together? This happens because the text is fixed to a price coordinate and when they move together, text moves together as well. Compare these screenshots:


extended pattern

If i squeeze it, the text ought to squeeze together as well but it doesn't in the Indicator:

squeezed pattern

How did the author accomplish that? Basically: Is there some convenient way to fix a textbox to the bottom of another textbox?


2) How can i draw text in the middle of a line so they stick to that centerpoint?


Thanks for helping! :)

 
RichPiano: This happens because the text is fixed to a price coordinate and when they move together, text moves together as well.
  1. Text boxes are an edit objects. Those in your image are not.
  2. Text objects are fixed to a price/time coordinate and thus move with the changing chart. And if you want them to remain on screen must be moved each new bar.
  3. Use a label object that is fixed in pixel coordinates (using OBJPROP_XDISTANCE) to the chart. See the example of ObjectCreate - Object Functions - MQL4 Reference