no, since the coments do not use a monospace font.
You can create a textlable and use a monospace font and use something like...
if (value < 10){ txt=" "+DoubleToStr(value,0); }else if(value < 100){ txt=" "+DoubleToStr(value,0); }else{ txt=DoubleToStr(value,0); }
nope
crossy:
My problem is the I want that this number will use always 3 places.
My problem is the I want that this number will use always 3 places.
string RJust(string s, int size, string fill="0"){ while( StringLen(s) < size ) s = fill + s; return(s); } Print(RJust(DoubleToStr(macd,0),3," "));
WHRoeder:
Thanks for your efforts, But I think that the other solution is better, and second I have finished it already - very good and simple.
Thank you, again.
WHRoeder's solution is more elegant and flexible.
zzuegg:
WHRoeder's solution is more elegant and flexible.
WHRoeder's solution is more elegant and flexible.
zzuegg,
You are a real GENTELMAN !

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
Hello freinds, I need your help.
As I use the "Comment" to show data on the screen, I want to controle the wideness of the comment.
For a better understanding I will give an example:
I want to have a comment line on the screen of the Stocastic indicator value.
Since it ranges from 0 to 100, and I don't care about the fractals but only the Integer number, so If Stoch = 75.28, I want
to see only the number 75.
I know How to do it: using Doubletostr(Stoch,0), or NormalizeDouble(Stoch,0).
My problem is the I want that this number will use always 3 places.
Normally, if Stoch=7 then it uses 1 places, if Stoch=45 then it uses 2 places, and if Stoch=100 it uses 3 place.
This "phenomena" creats a dynamic screen. It moves all the time, and I preffer to see it with stagnantic place (alway 3 place - Since the max is 100) as a nice and constant tablet.
Can somebody help.
Thanks.
Y.