Questions from Beginners MQL5 MT5 MetaTrader 5 - page 690

 
Top2n:

I apologise for the inconvenience.

//+------------------------------------------------------------------+
//| start                                                            |
//+------------------------------------------------------------------+
int start()
  {

а надо 

//+------------------------------------------------------------------+
//| start                                                            |
//+------------------------------------------------------------------+
int OnStart

  { 

But the file creates, not with the requested data,

result - one column filled with 17 rows of boolean true

There's a stringStringSetChar - swore at the beginning,

I changed it toboolStringSetCharacter - this might be the reason for the boolean error.

//+------------------------------------------------------------------+
//| PrepareString                                                    |
//+------------------------------------------------------------------+
string PrepareString(string s)
  {
   bool exit = false;
   int index = 0;
   string str = s;
//----
   while(!exit)
     {
       index = StringFind(str, ".", index);
       if(index > -1)
           str = StringSetChar(str, index, ',');
       else
           exit = true;
     }
   return(str);
  }

While I won't be at computer, I will not be able to give any hints. I will be in 4 hours, it's my day off.

 
Top2n:

I apologise for the inconvenience

//+------------------------------------------------------------------+
//| start                                                            |
//+------------------------------------------------------------------+
int start()
  {

а надо 

//+------------------------------------------------------------------+
//| start                                                            |
//+------------------------------------------------------------------+
int OnStart

  { 


Actually voidOnStart(), althoughint is allowed
 
Artyom Trishkin:

No, it's not the string -StringSetChar

Vitalie Postolache:
Actually you needvoidOnStart(), although it's allowedint

Thanks, but not the point!

 
Top2n:

No, it's not about the string -StringSetChar

Thanks, but not the point!

Are you sure you candeclare an array like this?

double arrayZ[ARRAY_SIZE_X,ARRAY_SIZE_Y];

 
Vitalie Postolache:

Are you sure you candeclare an array like this?

double arrayZ[ARRAY_SIZE_X,ARRAY_SIZE_Y];

And yet it didn't swear. Fixed it, no change.
 
Top2n:
And yet it doesn't swear. Fixed it, no change.

Doesn't it also fail on this one?

int handle =FileOpen(fileName,FILE_CSV|FILE_WRITE,' '), x, y;

 
Vitalie Postolache:

Doesn't it also fail on this one?

int handle =FileOpen(fileName,FILE_CSV|FILE_WRITE,' '), x, y;

I don't understand why X,Y and I don't see the catch anymore
 
Top2n:
I don't understand why X,Y and I don't see the catch anymore.
It's your code, I certainly don't understand why you have it written that way.
 
Vitalie Postolache:
That's your code, I certainly don't understand why you have it written that way.
The author of the article wrote, https://www.mql5.com/ru/articles/1443
Трёхмерные графики - профессиональный инструмент анализа рынка
Трёхмерные графики - профессиональный инструмент анализа рынка
  • 2006.12.06
  • Antoniuk Oleg
  • www.mql5.com
В это статье мы напишем простую библиотеку для создания трехмерных графиков и последующего их проcмотра в Microsoft Excel. Мы воспользуемся стандартными возможностями языка MQL 4 для подготовки и экспорта данных в файл формата *.csv.
 
Vitalie Postolache:
It's your code, I certainly don't understand why you have it written that way.
It's just a variable declaration
Reason: