Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1071

 
dmitriikirov43:

Glad you're smiling. As I'm at the start of my journey, I'm trying to learn how to do and look as much as possible. As for profit and strategy,

there are a lot of scripts available and it's easier to write it and change it later. This is where I try to find the answers

I can't find the answers to on the Internet or I can't figure out how to implement it. Above I wrote how I solved one of the 2 questions.

I think a dummy like me will understand how to use it))))

Above, you also wrote that the forum is "dead" (my interpretation). Consequently, you can only find an obsolete solution there. Artyom told you what to read in the documentation of the language. You have everything you need there. Exactly the creation of OBJ_LABEL and change of coordinates, but using new functions of the language. Instead of ObjectSet function it's more correct to use

bool  ObjectSetInteger( 
   long     chart_id,        // идентификатор графика 
   string   object_name,     // имя 
   int      prop_id,         // свойство 
   long     prop_value       // значение 
   );

and there is an example of setting marker coordinates in the documentation.

//--- установим координаты метки 
   ObjectSetInteger(chart_ID,name,OBJPROP_XDISTANCE,x); 
   ObjectSetInteger(chart_ID,name,OBJPROP_YDISTANCE,y); 

and tag text.

//--- установим текст 
   ObjectSetString(chart_ID,name,OBJPROP_TEXT,text); 

Based on this, you could save a lot of time by replacing your search with a careful reading of the guide.

And it should be noted that in the old language there is no"Graphic label" object, which is used to display the image. By this I saved you a lot of time you could have spent searching for dead forum with description of what wasn't there at all...

 
Alexey Viktorov:

Above, you also wrote that the forum is "dead" (my interpretation). Consequently, you can only find there an outdated solution. Artem has told you what to read in the documentation of the language. You have everything you need there. Exactly the creation of OBJ_LABEL and change of coordinates, but using new functions of the language. Instead of ObjectSet function it's more correct to use

and there is an example of setting marker coordinates in the documentation.

and the tag text

On that basis, you could have saved a lot of time by replacing your search with a careful reading of the guide.

And it should be noted that in the old language there is no"Graphical label" object, which is used to display the image. By this I saved you a lot of time you could have spent searching for dead forum with description of what wasn't there at all...

Thank you for the information, you understand that this is difficult for me, I have nothing to do with programming. I decided to try it out for myself out of interest. Most writing is like hieroglyphics to me, and every time I get something to add, I attribute 50% of success to magic and chance😆 Thank you!
 
dmitriikirov43:
Thank you for the information, you understand that this is difficult for me, I have nothing to do with programming. I decided to try it out for myself out of interest. Most writing is like hieroglyphics to me, and every time I get something to add, I attribute 50% of success to magic and chance😆 Thank you!

That's where EVERYONE starts.... Oddly enough, it's also hieroglyphics for me. In my school, named after Telman, everybody studied German and I didn't study any, but I got interested in programming... You don't have to rely on magic and chance, but on persistence and the ability to use your brain. Go ahead, it will all work out.

 
Vladimir Simakov:

Look. I'm sorry if I offended you. As for writing dll, mql lives in windows ecosystem, you write dll for windows, windows has a different time format. The link to the official docks I gave you. You can google examples up to ... If you want to learn - learn, if you want to copy...

The following example converts the Windows API time into Unix time.

Googled it, didn't check it.

How do you work with lines and colours? I read that they usewchar_t with strings, but if you write the following expression inside the function

_DLLAPI void fnReplaceString(wchar_t *text)
  {
   wchar_t  Text1="Text1";//не работает значит для строк wchar_t 
//не подходит

  }
 
Seric29:

How do I work with strings and colours? I read thatwchar_t is used with strings, but if you write this expression inside the function

The compiler writes everything to you, what's unclear there?
 
Vladimir Simakov:
The compiler writes everything to you, what's unclear?

Have you even looked at what he writes? I, for example, don't understand what it says. Also, there is a second question, is it really necessary to usewchar_t, is there something better?

 
Seric29:

Have you even looked at what he writes? I, for example, don't understand what it says. Also, there is a second question, do you really need to usewchar_t, maybe there is something better?

It tells you that you cannot initialize wchar_t entity with const char* value

If you don't understand it, you don't have the basics of the language, unfortunately. It's too early for you to write a dll, especially for such a specific thing as mql. Start with the basics.

 
Hi there. Guys, please help me. I am new to programming.
I wrote a simple Expert Advisor and now I need to add the following condition to it.
If a stop loss triggered a Buy order, then open a Sell order.
Please help with this code
 
jarikn:
Hello everyone. Guys, please help. I'm new to programming.
I wrote a simple Expert Advisor and now I need to add the following condition to it.
If a stop loss is triggered by a Buy order, then we open a Sell order.
Please help with this code

If it is very fast, go like this

Только "Полезные функции от KimIV".
Только "Полезные функции от KimIV".
  • 2011.02.18
  • www.mql5.com
Все функции взяты из этой ветки - http://forum.mql4...
 
Vitaly Muzichenko:

If it's really quick, it' s like this

Thank you. I'll look into it.