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

 
hoz:

Here is theStringGetChar function https://docs.mql4.com/ru/objects/ObjectFind

Why is it needed at all?

According to the textbook, it returns the value of a character as a number. There,"c" corresponds to the value 99. How can I understand it? What use does this function have?

So it returns a number... ...and what does it do?

I want to learn to work with strings, so I came across this function. That's why I'm asking.


Any ANSI character is encoded in a computer with 1 byte of information. For example,"s" is written in computer as 01100011, i.e. the same 99. This is the number that StringGetChar() produces. The function is often needed when reading binary data from files; you cannot do without it when calculating, for example, CRC, etc., etc.
 
Good day all, advise if you have to put an EA on the currency where the EA is attached (uses RSI, MACD) or is it enough or just prescribed in the algo...?
 
laveosa:
Good day all, advise if I should put the EA on the currency where the EA is attached (uses RSI, MACD) or is it enough or just prescribed in the algo...?

This is nonsense. Think about what you are writing. And then wait for an answer.
 
laveosa:
I just want to know if I should put an EA on a currency where the EA is attached (uses RSI, MACD) or is it enough or just prescribed in the algo...?
The work of the indicators on the chart has nothing to do with the work of the EA, unless they are exchanging information through, for example, an external file or global variables in the terminal, or chart objects.
 
TarasBY:
(respectfully): Telepath!
 
borilunad:

To write in a chart (not to be confused with a comment) you have to code it numerically. If you write 99, an 's' will appear on the chart. I haven't done it yet, but you can find how to do it all in the Doc, and with what font, size, X and Y axis orientation in pixels, etc. If that's all you're missing already, go for it, but it'll take a lot of time! Good luck!


Boris, you mean don't output via special functions (comment, alert ... print), but directly to the objects? For example, in the name of the object or on the picture, for example. Is that correct?

I couldn't find anything detailed about this in the textbook, un fortunately.

 
TarasBY:
The work of the indicators on the chart has nothing to do with the work of the EA, unless they exchange information through, for example, an external file or global variables of the terminal, or graphical objects.

thank you very much.... I got it, sorry for the typo.
 
hoz:

Here is theStringGetChar function https://docs.mql4.com/ru/objects/ObjectFind

Why is it needed at all?

According to the textbook, it returns the value of a character as a number. There,"c" corresponds to the value 99. How can I understand it? What use does this function have?

So it returns a number... ...and what does it do?

I want to learn to work with strings, so I came across this function. That's why I'm asking.

For example, I have a function that automatically assigns an EA a unique magic number based on the name of the EA, currency pair and TF where the EA is installed:

//+----------------------------------------------------------------------------+
int GetMagic(string symbolstring, int multiplier){
   int res=0;
   int len=StringLen(symbolstring);
   for(int i=0; i<len; i++)
       res+=StringGetChar(symbolstring,i);      
   return(res*multiplier);
}
//+----------------------------------------------------------------------------+

Call:

Magic=GetMagic(WindowExpertName()+Symbol(),Period());
 

So you don't have to read all sorts of crooked codes, like herehttps://www.mql5.com/ru/articles/1524

(I noticed a bunch of bugs there. I don't know what the author was thinking when he wrote this code).

Please point me to the algorithm of this variant. I want the pending order to follow the object, e.g. a trend line. Or the pending order was behind the line.

How is it implemented? I do not really understand it.

I understand that we should create an object. But we should somehow specify that if the price is "behind" the object, we should do something, or if the price is on the line, the pending order is on it...

 
hoz:


Boris, you mean, you don't output via special functions (comment, alert ... print), but to objects directly? For example, in the name of the object or on an image, for example. Is that correct?

I couldn't find anything detailed about this in the textbook, un fortunately.


Victor, I did a search in the Dock for you. So, I saw these codes in the CodeBase indicators I used for manual trading. It turned out to be far from a panacea. So I threw out almost all indicators, and now my Expert Advisor is its own indicator, and I don't need almost anything else!

By the way, I learned a lot digging around in the Base! You have to be an expert yourself to understand everything in the Dock! More detail in the textbook, but I'm already missing a lot!