The hst2csv script is used for converting *.hst files to *.csv files, that can be imported into the MetaTrader 4 client terminal with no errors.
Script Operation Principle
What is the purpose of this script: by the client's request, I once put together a history from the pieces given by the customer, and found out that not all files are read by the terminal at all when importing the data from a hst file. But the data inside is valuable. And this script converted all those non-importable files to csv, and comparing the file sizes - correctly.
Those who have a comma as a decimal point can have the quotes turn into dates when opening a csv in Excel... inevitably. I can not think of any other way than writing a separate function for converting the number to a string with "," as decimal separator. My system has ".", so I left it as is.
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/7092
The library for automated optimization of an EA during its operation.s_wininet
Example of using wininet.dll for downloading a web page.