Questions from Beginners MQL5 MT5 MetaTrader 5 - page 228

 
zfs:
Work out the algorithm. Sort the first array, remember the places and sort the rest in the same style. Or use a multidimensional array.
Or use structures at once. (I am consciously keeping silent about objects for now).
 
micle:
Or use structures directly. (I deliberately keep silent about objects for now).
This is when the data types are different, in the example they are the same).
 
zfs:
This is when the data types are different, in the example they are the same).

What difference does it make? Are they the same or different??? The important thing is that they are linked... So why not store them together?

 
YAndrey:

How to sort multiple arrays???

I have some thoughts, but maybe someone has a better option???

You could use the standard library and structures as Obj.
 
pronych:
You can use the standard library and structures as Obj.
the question "Why?" always remains valid...
 
micle:
the question "Why?" always remains relevant...
Already because there are places to see how you can do it and take it as an example.
 
zfs:
Work out the algorithm. Sort the first array, remember the places and sort the rest in the same style. Or use a multidimensional array straight away.
Yes, that's exactly the idea. Multidimensional won't work - it's dimensionless in one dimension only...
 

Good afternoon. I am asking for help: There is an MQL4 script that collects indicator histories into a csv file. After that the file is loaded into MySql database for further analysis. I have decided to rewrite the script for MQL5. It seems to be good, the file is being created with data, but when loading it into MySql, only the varchar type cells are filling and the rest of the cells with numbers and dates are not filling. What can be the catch?

 
red-nicolas:

Good afternoon. I am asking for help: There is an MQL4 script that collects indicator histories into a csv file. After that the file is loaded into MySql database for further analysis. I have decided to rewrite the script for MQL5. It seems to be good, the file is being created with data, but when loading it into MySql, only the varchar type cells are filling and the rest of the cells with numbers and dates are not filling. In what may be the catch?

There are several variants:

- dot/comma in fractional numbers

- date format. Look carefully at the order of the year, month, day. How they are separated, and other trivia.

- check the presence/absence of quotation marks{"}/apostrophes{'} in numerical data.

Compare VISUALLY 2 files. the one created by Expert Advisor in MQL4 and in MQL5

 
micle:

There are several options:

- dot/comma in fractional numbers

- date format. look carefully at the order in which the year, month, date are in. What separates them, and other details.

- check the presence/absence of quotation marks{"}/apostrophes{'} in numerical data.

Compare VISUALLY 2 files. the one created by Expert Advisor in MQL4 and the one in MQL5

1) Fractional numbers have full stop, separator is semicolon.

2) Date format is correct.

3) There are no inverted commas or apostrophes.

4) The files are identical.


Maybe there are some hidden characters or encodings. If I open this file in xxel and save it again to csv, then the database file is loaded normally.

Reason: