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);//записываем в массив stringStringSetLength(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;
}
//+------------------------------------------------------------------+
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.
Two orders are open but OrdersTotal() function returns 0. What may be the reason? Thank you.
MQL5: Examples:
In fact, you can set Excel to put a full stop instead of a comma.
You can. Not in Excell, but in the OS.
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:
DECOMPILING IS FORBIDDEN!
What does decompiling have to do with it, I don't get it?
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?
Confused about the correct spelling of the condition, help: