Hello, I wonder if there is a software (MT4/MT5) - it can be paid - which can export data in CSV format for a list of symbols and timeframes automatically? There are some scripts which do it partially - by attachign to single charts (https://www.mql5.com/en/code/232) but i do not wish to download the data from each chart separately. Need a bulk solution which can export it all. Thansk a lot!! Dima
Can you locate the source data for your metatrader app. For example, if you could locate 1 minute source data I have some tools that can convert it to any time frame you want.
You'll have to set up each pairs chart separately as MT4 won't store data for non-existent charts. Best bet is to set up one minute charts for the pairs of interest, read the .hst files into csv, then use Fan24's software to convert to other timeframes. .hst file format is trivially easy to parse: 148 byte header which you can ignore, then 60 byte bars: longint datetime, ohlc as doubles, long int tickvolume, int spread, longint "realvolume."
thank you very much for your detailed replies - i need a few years woirth of daily and weekly data - woudl be hard to construct it from hourly charts. I have a neatly working scrip which exports the data when I attach to a single chart. Can this script be run by a macro which will progerssively attach it to all of the open charts - automatically? just run through all open charts... the scrip is here https://www.mql5.com/en/code/232
can anyone please help me with this - it shoudl be ntpo hard to cycle throgh all open charts and attach this script?
I see from your script link that you are working in MT5, with which I am not familiar. In MT4 (IIRC, I haven't worked with it in years), to attach a script programmatically, you import a few functions from user32.dll, get the integer hWnd from calls to WindowHandle with the pair and timeframe, then to attach use SendWindowMessage with the hWnd, a number (I think 12 or 13) and the script name. I have no idea if MT5 works the same way. It would almost certainly be easier to figure out the file format for the MT5 historical files, which is probably pretty simple, and read them directly into CSV. Find the filespec, post a sample file here, and I'll write you, and post here, a 10 line C program that converts it to CSV.
Thank you for your kind reply - I am actually using MT4 - only referrign to this script because ti really does this export well - my prigrammign skils are limited - maybe you can recommend a paid software/advisor which can do this (bulk export all data in csv format)? maybe there is still such export app available somewhere?