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

 
Vladimir Karputov:

It is better to open the file directly - without applying the "Get data from text file" command. (File - Open - Browse). This way, the data will be correctly recognised immediately.

I'm a bit confused, this data is received after uploading from OnTester. How can I load them directly into xlsx with the FileWrite function?

 
Alexandr Sokolov:

I'm a bit confused, this data is obtained after uploading from OnTester. How can I load them directly into xlsx using FileWrite function?

MQL5 creates a file. Then you open this file in Excel. To do it, use Excel ->File - Open - Browse

 
Vladimir Karputov:

MQL5 creates a file. You then open this file in Excel. To do this, use Excel ->File - Open - Browse

Ok, thanks

 
Alexandr Sokolov:

I'm a bit confused, this data is obtained after uploading from OnTester. How can I load them directly into xlsx using FileWrite function?

Vladimir Karputov:

MQL5 creates a file. Then you open this file in Excel. To do it, use Excel ->File - Open - Browse.


Then don't forget to click "save as" - Excel uses file locks and as long as the document is open in Excel (even a stunted CSV) you won't be able to overwrite it.

 
Can a structure be passed to a function if it is declared locally, i.e. in the program code?
 
Seric29:
Can a structure be passed to a function if it is declared locally, i.e. in the program code?

Structures can only be passed by reference. So, you can pass it to a function by reference from the scope of that structure.

 
Artyom Trishkin:

Structures can only be passed by reference. So, from the scope of this structure you can pass it by reference to a function.

I did this.

But there is no point in such a transfer. In this case, the structure is declared globally and is accessible from anywhere in the program. However, I don't know if I did it correctly. I want to declare a structure locally and pass it to a function.

 
Seric29:

I did this.

But there is no point in such a transfer. In this case, the structure is declared globally and is accessible from anywhere in the program. However, I don't know if I did it correctly. I want to declare the structure locally and pass it to a function.

You declare a variable with structure type in local scope, and send it to a function. In the same local scope.

 
Alexandr Sokolov:

OK, thanks

It is also recommended that you check the regional settings in Windows - namely whether ',' or '.' is specified as a separator. I recommend setting '.' as the separator.


 

Good day to you all.

Can you tell me how to attach your own sound to"Alert()"?