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

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Good afternoon!
Question: is it possible with MT4 Advisor to open a csv file of 1-5GB in size, and overwrite into a new csv/txt file of the same size.
The essence is to find empty bars, mega-bars and gaps in the file with tick quotes. To correct them, and rewrite in a new file (1 year is 500-1000mb )
P.S. scripts and other stuff to work with minute quotes not to offer.
Thank you!
The file contains 2019510
How do I add a zero to a month in a simple way without using if?
The file contains 2019510
How do I add a zero to a month in a simple way without using if?
Which zero? Where to add? Can I give you an example?
What zero? Where to add? Can you give me an example?
Writing the current date into the file, I get 2019510 instead of20190510
Perhaps there is a formatting setting, but the help does not say so.
Writing the current date into the file, I get 2019510 instead of20190510
Perhaps there is a formatting option, but the help does not say so.
It says:
Strange that filling is not done in TimeToStruct. Looking inIntegerToString I didn't think, as it's all the same what data to write to the file, thanks.
The file contains 2019510
How to add zero to a month in a simple way without using if?
Good afternoon!
Question: is it possible with MT4 EA to open a csv file of 1-5GB in size and overwrite it into a new csv/txt file of the same size.
The idea is to find empty bars, megapips and gaps in the file with tick quotes. To correct them, and rewrite in a new file (1 year it is 500-1000mb )
P.S. scripts and other stuff to work with minute quotes not to offer.
Thank you!
Checked, you can:
1. open 2 files, one to read, the second to write and read and write at the same time
2. You can read one file into an array, process the data, then write the array into a file, but note that MT4 is 32-bit and memory for such programs is limited to 2GB, i.e. the ArrayResize() function will not allocate memory to resize the array,https://docs.mql4.com/ru/array/arrayresize
SZY: I don't offer scripts or anything like that.
Strange that filling is not done in TimeToStruct. I didn't think to look for it in IntegerToString, since it doesn't matter what data is written to the file, thanks.
It's much stranger to think that 05 will be written to an int-variable instead of 5.
05 is already a display int-number - there you have to specify the format you want.
And here is an example of why you should do it yourself, as cited by Igor:
Forum on Trading, Automated Trading Systems and Testing Strategies
Any questions newbies have on MQL4, help and discussion on algorithms and codes
Igor Makanu, 2019.05.11 06:16
This variant will output the date already formatted. But not the way you need it(as you indicated):
Forum on trading, automated trading systems and trading strategy testing
Any questions from newbies on MQL4, help and discussion on algorithms and codes
psyman, 2019.05.10 22:14
Writing current date into file, i get 2019510 instead of20190510
Perhaps there is a formatting setting, but the help doesn't say so.
Read the format of MqlDateTime structure to understand: