Questions from Beginners MQL5 MT5 MetaTrader 5 - page 691

 
Top2n:
The author of the article wrote, https://www.mql5.com/ru/articles/1443

No, that was my mistake, it's just a comma-separated variable declaration, it's OK there )

Artyom Trishkin:
It's just a variable declaration

Yeah, yeah, my bad, I got it, I didn't read the code carefully.

 
Top2n:

So what are you complaining about? The file is created, everything in the columns seems to be positioned as it should be...

Files:
test.csv.txt  3 kb
 
Vitalie Postolache:

So what are you complaining about? The file is created, everything in the columns seems to be positioned as it should be...

Did you make it in Five? Five doesn't allow you to pass a multidimensional array into the function if the second dimension is not specified.
 
Artyom Trishkin:
Did you do it in F5? Five doesn't allow you to pass a multidimensional array into a function if the size of the second dimension is not specified.

Why on five, if the source code was for four, what can be seen in the header? Are there any start(), init(), deinit() functions on five?

Besides, arrays there can easily be done globally and not passed to a function at all. Not to mention the fact that the code can be combined in one file, and not scattered among the inludes.

 
Vitalie Postolache:

Why on five, if the source code was for four, what can you see in the header? Are there any start(), init(), deinit() functions on five?

Besides, arrays there can easily be done globally and not passed to a function at all. Not to mention the fact that the code can be combined in one file, and not scattered among the inludes.

Well, well, well... Why would I put in a text that is already clear without any reason?

Since the person is asking for OnStart() instead of start(), it means that the code must either be for the new fourth or fifth version.

And it's clear that it's better to put everything together...

 
Hello, can someone give me a hint?
 
I can't open the Expert Advisor, it only opens with some kind of player
 
Treder9:
I can not open the Expert Advisor opens only with some player
Do you have a screenshot?
 
Vitalie Postolache:

Why on five, if the source code was for four, what can you see in the header? Are there any start(), init(), deinit() functions on five?

Besides, arrays there can easily be done globally and not passed to a function at all. Not to mention the fact that the code can be combined in one file, and not scattered among the inludes.

 Artyom Trishkin:

Well, well, well... Why so immediately so that it is already clear without so?

Since the person is asking for OnStart() instead of start(), it means that either the new 4 or 5 must be supported.

It's better to put everything in one pile - it's clear anyway...

Yes, I need code for five!

I set the second dimension in the two-dimensional array.

I could make it simpler and clearer, but I'm not very clever.

//+------------------------------------------------------------------+
//+------------------------------------------------------------------+
//| PrepareString                                                    |
//+------------------------------------------------------------------+

string PrepareString(string s)
  {
   bool exit = false;
   int index = 0;
   string str = s;
//----
   while(!exit)
     {
       index = StringFind(str, ".", index);
       if(index > -1)
           StringSetCharacter(str, index, ',');// удалил присвоение str = StringSetCharacter(str, index, ',');
       else
           exit = true;
     }
   return(str);
  }

The program started putting the data into *.csv.

Files:
VCSV.mq5  7 kb
 
Renat Akhtyamov:
Do you have a screenshot?

I can make a screenshot, I mean I just can not open the sonnet, I download and then I click at the bottom left to open, but it opens only with the player why so?

I've downloaded it recently but I can't remember now.

Reason: