Please edit your post and
use the code button (Alt+S) when pasting code
I know that it is not obvious, but topics concerning MT4 and MQL4 have their own section.
In future please post in the correct section.
I will move your topic to the MQL4 and Metatrader 4 section.
I use the following code to place text on a chart. In this case, just above the high of a bar by 10 pips (LabelOffset).
This placement looks fine for some parts of the chart. That is; the text is easy to read. On other parts of the chart the text is further away from the bar high, and in other parts the text overlaps the bar. This is because the bar volatility changes over the chart.
I would appreciate any suggestions on how to better position the text on the chart.
Thanks,
Mervyn