Unfortunately: no success. Everything is glued together.
any ideas?
It's very likely that MT4 is using the Win32 TextOut() or ExtTextOut() functions rather than TabbedTextOut(), and therefore including tab characters isn't going to have any effect. If you want tabulated text, you are almost certainly going to have to use multiple chart objects (OBJ_LABEL) instead of Comment().
... for comparison and general background, the reason why dotted or dashed lines in an MT4 indicator have to be 1 pixel wide, with all lines of 2 or more pixel-widths being solid, is almost certainly that MT4 is passing on a restriction in the antediluvian Win32 CreatePen() function.
text=StringConcatenate("tic= ",tic," tac= ",tac," toe= ",toe);
I basically thow in a bunch of spaces. This has the disadvantage that with multiple lines, things are not aligned because of the different values of tic/tac/toe on each line
As I understand it, an example of route206's issue would be that the following numbers are not properly right-aligned (because of the proportional font which MT4 is using):
Comment(" 111.11\r\n8888.88");
Similarly, attempts to use special space characters such as 0xA0, 0x2000, 0x2001 etc are unsuccessful, because all the space characters in the typeface are the same width, and different to the width of the numbers:
Comment("\x00A0111.11\r\n8888.88");
The only way to get the alignment which route206 wants is to pad with zeroes, or another character of the same width such as _
Comment("0111.11\r\n8888.88"); Comment("_111.11\r\n8888.88");
...or to use chart objects instead of Comment()
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I throw a lot of info on the chart in my EAs and would like to organize that a little better.
To separate values I now go about it as follows:
I basically thow in a bunch of spaces. This has the disadvantage that with multiple lines, things are not aligned because of the different values of tic/tac/toe on each line (e.g. 2.01 and 2.0009 on the next line)
Hence I tried:
hoping that like \n for a new line, \t would give me tab, which would better that just a bunch of random spaces between brackets.
Unfortunately: no success. Everything is glued together.
any ideas?
tx