52002651:
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.
When placing text using the high of the current bar, you should reset the price co-ordinate until the bar closes.
Keith Watford
When placing text using the high of the current bar, you should reset the price co-ordinate until the bar closes.
Thanks for the advice.
However, I see this problem using historic price data. That is; with a fixed level for the high.
May I suggest that you try
string obName=""; //add name ObjectSetInteger(0,obName,OBJPROP_ANCHOR,ANCHOR_LOWER); //For objects at the high ObjectSetInteger(0,obName,OBJPROP_ANCHOR,ANCHOR_UPPER); //For objects at the low
That works very nicely.
Thank you,
Mervyn
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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