Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1044

 
Konstantin Nikitin:

In general, you can set Excel to put a full stop instead of a comma.

You can adjust the Regional Settings in the operating system itself.

 
Eduard Shpigelman:
Two orders are open but OrdersTotal() function returns 0. What may be the reason? Thank you.

MQL5: Examples:

 
Konstantin Nikitin:

In fact, you can set Excel to put a full stop instead of a comma.

You can. Not in Excell, but in the OS.


 
Alexey Viktorov:

You can. Just not in Excell, but in the OS.

I remember that something can be set up. It's been a long time since I've had that in my head. But the main thing is that you can...

 

What I got was the following:

For convenience, I had to rework the Excel spreadsheet so that all the necessary data would be collected in one first (A) column, in a column. It turned out to be more convenient to read from the leftmost column and convert everything to double than to collect them from all the rows. The code in the end took the following form:

//+------------------------------------------------------------------+
//дата 
   datetime t=D'2019.05.17';
//+------------------------------------------------------------------+
   string FileName="Книга1 EURUSD.csv";
//+------------------------------------------------------------------+
   string sy[80];//количество необходимых данных
   double dy[80];//
   ArrayFill(dy,0,80,0);//явно обнуляем
   int c=0;

   int hf=FileOpen(FileName,FILE_READ|FILE_WRITE|FILE_CSV|FILE_ANSI);
   if(hf!=INVALID_HANDLE)
     {
      while(!FileIsEnding(hf))
        {
         sy[c]=FileReadString(hf);//записываем в массив string
         StringSetLength(sy[c],20);//укорачиваем строку, т.к. явно будет меньше 20 значащих цифр
         StringReplace(sy[c],";","                    "); //меняем первый(;) на 20 пробелов
         StringSetLength(sy[c],20);//ещё раз укорачиваем строку
         StringTrimRight(sy[c]);//Удаляем ненужные пробелы справа, т.о. укорачиваем строку до значащих символов
         StringReplace(sy[c],",",".");//меняем (,) на (.)
         dy[c]=StringToDouble(sy[c]);//переводим string в double и записываем в массив double

         c++;//считаем, сколько записать данных в массив
         if(c>=80)break;//выходим из цикла по окончании массива
        }
/*
      //сверяем с таблицей в Excel, если нужно
      for(int i=0;i<80;i++)
        {
         Alert("8   i=",i,"   dy[i]=",dy[i]);
        }
*/
     }
   else
     {
      Alert("Не удалось открыть h_f. Код ошибки = ",GetLastError());
      return;
     }
//+------------------------------------------------------------------+
 
Roman Sharanov:

DECOMPILING IS FORBIDDEN!

What does decompiling have to do with it, I don't get it?

 
Roman Sharanov:

What does decompiling have to do with it, I don't understand?

Maybe you posted the decompiled code? Maybe you asked for something else to do with decompiling the executable?

 
No, just the incompetence of whoever made the judgement.
 
I don't claim to have been a moderator.
 

Confused about the correct spelling of the condition, help:

   if ((ma_slow[0]-ma_slow[9]) > (5*Point()))
Reason: