Have text label move aligned with horizontal support/resistance lines as I scroll chart both left and right and check multiple timeframes

 
Hi,

I have text label indicated on horizontal lines that I have drawn on my chart.On the first picture "4125 on 1 minute chart.png" I have correctly put text label 4,125 on the horizontal  line in red on price 4,125 on a 1 minute chart

As I scroll both left and right on the chart or check the charts in multiple timeframes,the text labels lose their alignment with the horizontal  lines that I drew.On the second image "4125 on 4 hour chart.png" when I check the chart on the 4 hour timeframe,the text label 4,125 is now on its own and isnt aligned with the 4,125 horizontal line as it was on the 1 minute chart.

I was hoping for a permanent alignment between the horizontal  lines and their corresponding labels in all timeframes and when I scroll both left and right on the chart

Kindly assist in achieving this.
Documentation on MQL5: Constants, Enumerations and Structures / Chart Constants / Chart Timeframes
Documentation on MQL5: Constants, Enumerations and Structures / Chart Constants / Chart Timeframes
  • www.mql5.com
Chart Timeframes - Chart Constants - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Joe Trader: I have text label

There are text objects and there are label objects. There are no text label objects.
     How To Ask Questions The Smart Way. (2004)
          Be precise and informative about your problem

 
William Roeder #:

There are text objects and there are label objects. There are no text label objects.
     How To Ask Questions The Smart Way. (2004)
          Be precise and informative about your problem

There is text label as shown on MT5 screenshot "text label.png" attached.That is the button I am referring to

Files:
text_label.PNG  20 kb
 
  1. And when you select it, you get a label: label
  2. Joe Trader #: That is the button I am referring to

    Read what the difference is. A label is fixed (X/Y) pixel location; it never moves when you change or scroll charts. A Text object is price/time.

 
William Roeder #:
  1. And when you select it, you get a label:
  2. Read what the difference is. A label is fixed (X/Y) pixel location; it never moves when you change or scroll charts. A Text object is price/time.

Well can I get a text object that is aligned to horizontal lines?

That is all I am asking

 
Joe Trader #:

There is text label as shown on MT5 screenshot "text label.png" attached.That is the button I am referring to

You need to use "Text" object, not "Text label".
 
Alain Verleyen #:
You need to use "Text" object, not "Text label".

I had already tried Text Object too.It doesnt work when you scroll the charts to the left and right and text left behind when new candlesticks are formed as time goes by so that if goes further and further to the left with time until it disappears from the chart and one is forced to move the text to the right all the time

 
Joe Trader #:

I had already tried Text Object too.It doesnt work when you scroll the charts to the left and right and text left behind when new candlesticks are formed as time goes by

It should not.

Provide full screenshots (not tiny area) of the chart and of your object properties to show what you are doing.

 
Alain Verleyen #:

It should not.

Provide full screenshots (not tiny area) of the chart and of your object properties to show what you are doing.

Please find the first screenshot of when I put the text objects on the horizontal lines at 16.04 my local time.Image appropriately named as "text objects at 16.04 local time.png" and check on the X-axis highlighted as approx 16.04 my local time.

As time passed on upto my current time approx 19.37 find the screenshot named "text objects at 19.37 local time.png".As you can see from this screenshot,none of the text objects are appearing as they are all stuck at the 16.04 X axis time.I am normally forced to move each text manually to re-align them with their corresponding horizontal lines which is extremely tedious.I need these text objects to dynamically move with the chart and remained fixed and aligned to their corresponding horizontal lines  as time goes by and new candlesticks are formed and remain aligned if I scroll through the charts to the left to review historical price action. 

The properties that I have on these text objects (example text object 4,125) are shown in the other 3 screenshots.


 

Sorry, I had misunderstood your issue.

It's normal your text is not moving as it's set with date time for today at 16:05, it will stay there.

You need a custom code (indicator or EA) to update the price/datetime where your texts are displayed.

 
Yes I did suspect the text wouldnt move as you have explained.

If anyone has a code that can tie a text to a horizontal line that would be helpful.Hopefully in future the MT developers would add a feature in horizontal lines properties to enable traders add custom text thats always aligned to the lines and dynamically move with the chart 
Reason: