[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 65

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
Roll, thanks for the tip, here's a feature to display a comment in the bottom left hand corner of the chart if anyone needs it:
void mycomment(color c,string mytext)
{
string name="mycomment";
if(ObjectFind(name)<0) ObjectCreate(name,OBJ_LABEL,0,0,0);
ObjectSet("mycomment", OBJPROP_CORNER, 2);
ObjectSet(name,OBJPROP_XDISTANCE,5);
ObjectSet(name,OBJPROP_YDISTANCE,7);
ObjectSetText(name,mytext,12,"",c);
}
Hi all!
Can you tell me if it's possible to display text on a graph, like
output as a separate function so it can be called like this:
Look at this function:
It looks for empty Win_Inform indicator window on the chart and, if it is present, displays messages in it. If not, outputs it with print.
Example call:
Uses array string Mass_Name_Message[10] declared at global level. This is an array for storing object names. You can change its size to suit your needs. The Prefix variable stores names of experts to allow them to identify their own objects for correct handling of graphical objects. It is also declared globally and has the string type. You can probably figure it out...
Turkey in a trailer
Faced with a small problem with my function:
void mycomment(color c,string mytext)
{
string name="mycomment";
if(ObjectFind(name)<0) ObjectCreate(name,OBJ_LABEL,0,0,0);
ObjectSet("mycomment", OBJPROP_CORNER, 2);
ObjectSet(name,OBJPROP_XDISTANCE,5);
ObjectSet(name,OBJPROP_YDISTANCE,7);
ObjectSetText(name,mytext,12,"",c);
}
It trims a long message, for example if you try to comment on the line "Check your EA settings, to open the settings window press F7".
it just leaves this: "Check your EA settings to open the settings window" and then it is cut off, although the text is not even halfway down the window.
Can you please tell me if there is any way to remove this restriction?
No, maximum line length in label = 62 characters.
Format the text into multiple lines (labels), or use Comment() - there are 255 characters
Below is the code itself.
If you have a simpler solution, I would be glad to receive comments.
Faced with a small problem with my function:
void mycomment(color c,string mytext)
{
string name="mycomment";
if(ObjectFind(name)<0) ObjectCreate(name,OBJ_LABEL,0,0,0);
ObjectSet("mycomment", OBJPROP_CORNER, 2);
ObjectSet(name,OBJPROP_XDISTANCE,5);
ObjectSet(name,OBJPROP_YDISTANCE,7);
ObjectSetText(name,mytext,12,"",c);
}
It trims a long message, for example if you try to comment on the line "Check your EA settings, to open the settings window press F7".
it just leaves this: "Check your EA settings to open the settings window" and then it is cut off, although the text is not even halfway down the window.
Can you please tell me if there is any way to remove this restriction?
How can I fill this gap?
How can I upload the history without any holes?
And is there any way to check if there is a hole in the history?
Try my function. It is above your post on this page. Split a string into several strings so that each string is no more than 64 characters long. My function outputs these split lines one above the other. Then, when the next message is displayed, it grayscales the old ones above, and displays the new message in the colour you set when you called my function.