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

 
Valeriy Yastremskiy:

No banter, they expand and stick to the top, sides, bottom, collapse and may not be visible under the charts and ktrl N does not help, the window is not visible, and it opens in collapsed form. Profile does not always help, it only displays the right charts. All in all I know and with my mouse pulled it off and the window was glued to the top, and fumbling (accidentally) at the top (another great task), where it is attached to the mouse, I again extremely unsuccessfully pulled it off and it disappeared. It was open, but not visible under the windows. Closed all the charts and saw the edge of the rolled up window, unfolded it, it stuck to the top... ))) After a few hours I learned how to peel it off from the top and sides. Already wanted to create a help topic))))

Now I try not to fool around with windows and panels)))

Sometimes nothing helps. If terminal.ini is deleted, in config, there will be the original settings.
 
Александр:
Sometimes nothing helps. If terminal.ini is deleted, in config, there will be the original settings.

Yes, as a cardinal way out)

 
Alexey Viktorov:

Press ctrl+n

Alexander:
Sometimes nothing helps. If terminal.ini is deleted, in config, there will be the original settings.
Valeriy Yastremskiy:

Yes, as a cardinal solution to the situation)

:-) Thanks. I'll keep that in mind for the future.
 
I've been coming back to this question for more than a week now, but I've been trying to find the answer and searching again with no result. I don't understand how I can do the following:
How to make an array like "double amountArray[]={5,10,20,40.1,80,100,100}; can be seen and changed in the input parameters of the program, i.e., Expert Advisor or indicator.5,10000,20000,27.6};" was visible and it can be changed in the input parameters of the program, ie, Expert Advisor or indicator.
With the string array no questions, but if you use it for me to pop up next unsolvable question, how to convert the string array to a numeric((.
Please help me, I'm stumped.
 
Александр:
I've been coming back to this question for more than a week and failed to find an answer, I keep looking for it again with no result. I have not understood how to make the following:
How to make an array like "double amountArray[]={5,10,20,40.1,80,100.5,10000,20000,27.6};" was visible and it can be changed in the input parameters of the program, ie, Expert Advisor or indicator.
With the string array no questions, but if you use it for me to pop up next unsolvable question, how to convert the string array to a numeric((.
Please help me, I'm stumped.

Enter a comma-separated string in the input parameters

input string str = 5,10,20,40.1,80,100.5,10000,20000,27.6;

and then in OnInit() divide it into substrings

int  StringSplit( 
   const string   string_value,       // строка для поиска подстрок 
   const ushort   separator,          // разделитель, по которому в строке будут искаться подстроки 
   string         & result[]          // массив, переданный по ссылке, для получения найденных подстрок 
   );

and translate it element by element into another array of double type.

There is no other option. Neither copy string into double, nor union does not work with type string

 
Александр:
I've been coming back to this question for more than a week now, but I keep looking for an answer but it's useless again. I don't understand how I can do the following:
How to make an array like "double amountArray[]={5,10,20,40.1,80,100,100};.5,10000,20000,27.6};" was visible and it can be changed in the input parameters of the program, ie, Expert Advisor or indicator.
With the string array no questions, but if you use it for me to pop up next unsolvable question, how to convert the string array to a numeric((.
Please help me, I'm stumped.
input string numeric="1,0.3,1.5,3,4.2,5.7,2";

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void OnStart()
{
   string FillSymb[];
   double SymbTrade[];
   int CountSymbol=StringSplit(numeric,StringGetCharacter(",",0),FillSymb);
   ArrayResize(SymbTrade,CountSymbol);
   for(int i=0; i<CountSymbol; i++) {
      SymbTrade[i]=FillSymb[i]; // Создадим массив double
   }

   for(int i=0; i<ArraySize(SymbTrade); i++) {
      Print(SymbTrade[i]); // Распечатаем массив double
   }
}

---

But it must be arrayed from the string in OnInit()

 
Vitaly Muzichenko:

Can't a comma be put in single quotes?

int CountSymbol=StringSplit(NameSymb,',',FillSymb);

why refer to a function???

 
Alexey Viktorov:

Can't a comma be put in single quotes?

why call a function?

That's how it's done around here...good code should be plenty.

 
Alexey Viktorov:

Can't a comma be put in single quotes?

Why do you need to refer to a function?

Yes, it turns out you can, I'll keep that in mind. I took an example from the help, it went like this

input string numeric="1,0.3,1.5,3,4.2,5.7,2";

string FillSymb[];
double MassNum[];

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void OnInit()
{
   int Count=StringSplit(numeric,',',FillSymb);
   ArrayResize(MassNum,Count);
   for(int i=0; i<Count; i++) {
      MassNum[i]=(double)FillSymb[i]; // Создадим массив double
   }
}
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void OnStart()
{
   for(int i=0; i<ArraySize(MassNum); i++) {
      Print(MassNum[i]); // Распечатаем массив double
   }
}
 
Alexey Viktorov:

Enter a comma-separated string in the input parameters

and then in OnInit() divide it into substrings

and translate it element by element into another array of double type.

There is no other option. Neither copy string into double, nor union does not work with type string

Thank you !!!!
Reason: