Set Button on Horizontal Line - page 2

 
Fernando Carreiro #: But that is exactly the point! The OP wants it to shift and follow the candle, not stay fixed on the chart. He wants it relative to a candle.

But then he complains that "the button is constantly adjusting with chart shifts.”

 
@William Roeder #: But then he complains that "the button is constantly adjusting with chart shifts.”

You should remember that he the OP is not a natural English speaker so you need to "interpret" the implied meaning.

Te OP is referring to the "jitter" caused by updating the x,y position every time the chart is shifted, just as I had warned would happen.

 

Location of buttons in specified in pixels on the chart – so you canot set the price and time for them. You must set Xlocation and Ylocation in pixels.

You can convert price and time into x/y location by ChartTim PriceToXY: https://docs.mql4.com/chart_operations/charttimepricetoxy

ChartTimePriceToXY - Chart Operations - MQL4 Reference
ChartTimePriceToXY - Chart Operations - MQL4 Reference
  • docs.mql4.com
ChartTimePriceToXY - Chart Operations - MQL4 Reference
 
Marzena Maria Szmit #: Location of buttons in specified in pixels on the chart – so you canot set the price and time for them. You must set Xlocation and Ylocation in pixels. You can convert price and time into x/y location by ChartTim PriceToXY: https://docs.mql4.com/chart_operations/charttimepricetoxy

That has already been discussed and even tried by the OP. The point of discussion has already moved on and is currently beyond that.