Questions about MQL4. - page 6

 
Nah, lied, But it still comes in handy. Here's more from the help:
bool ObjectSetText( string name, string text, int font_size, string font=NULL, color text_color=CLR_NONE)


Sets object description. The function returns TRUE if successful, otherwise FALSE. For more information about the error, call GetLastError().

Parameters

name - The name of the object.
text - The description text of the object.
font_size - Font size in dots.
font - Name of the font.
text_color - Text colour.

Example

ObjectSetText("text_object", "Hello world!", 10, "Times New Roman", Green);
 
Rosh,
Thanks for the effort!:)
I have read it. I try not to ask questions that are answered in the help.
I almost certainly know that this clearing got to the control panel by accident, inherited just, apparently, from a text label. There is no access to it. The only thing you can do with it is to write by hand (think of something) and then in the panel "List of Objects" to read these inventions. But what if I'm wrong? I hope the developers will answer. Simply NO. Or YES, but then it would be good to know HOW.
 
Apparently, you've tried it. I haven't yet.
 
Interesting, I wanted to check this function (I was ready to get an error beforehand), inserted a check, but it didn't even make it through the compiler, although the help specifies that ObjectSetText() should return a boolean value.
Files:
pic_4_.jpg  88 kb
 
Nevertheless, this code works ! :)
//+------------------------------------------------------------------+ //| поставим стрелку | //+------------------------------------------------------------------+ void SetArrow(datetime _time,double _price,string _Description ,int _arrowType, color _arrowColor) { bool res; ObjectCreate(_Description,OBJ_ARROW,0,_time,_price); ObjectSet(_Description,OBJPROP_ARROWCODE,_arrowType); ObjectSet(_Description,OBJPROP_COLOR,_arrowColor); ObjectSetText(_Description,"Проба", 10, "Times New Roman", Green); if (!res) Print(GetLastError()); }

Naturally, the font size and colour do not respond to what is set, but the description itself does.
Files:
pic_5_.jpg  103 kb
 
!:))
It reminded me of that episode of 'The Munchausen' where he proposes to start a new day on May 32 and the Burgomaster says: "But there's no room here!" :)
 
Rosh!

You are a genius! You managed to put the text in the arrow! That's great! That's what courage is!:)))
That means a lot to me. I'm gonna... I'll get back to work.
Thank you.
 
Stop. I have the opposite task. I have to read this text programmatically... I'm afraid to try it, what if it doesn't work?
 
It turns out that if the parameters are specified correctly, the compiler will normally skip the line
res=ObjectSetText(_Description,"Проба", 10, "Times New Roman", Green);


We do not get any errors during the operation of the Stirlitz script, so the
if (!res) Print(GetLastError());

does not show anything.
BUT...
The script becomes very slow:)
Trades are traced before your eyes, icons are placed at a rate of a few pieces per second (before it flew by instantly)
So, the terminal has some objections to such usage.
So, it's a slow motion video :)
 
Yes, I've noticed a significant slowdown in some cases too.
And my question doesn't seem to be resolved:(
Reason: