Import historical data from MT5

Posted By: fredperim

Import historical data from MT5 - 07/17/21 14:17

Hello,
I was wondering which is the best way to import historical data from MT5 platform. I exported a csv file but when I try to
import into Zorro it gives an error about date format.
Fred
Posted By: anissyo

Re: Import historical data from MT5 - 07/17/21 15:53

Have you converted the data to t6 format or another compatible format ?


if you did and you did it trough the CSVtohistory script, you just need to put in the right format by making changes to the string format line, if not clear show me an example of the csv file you are trying to convert and i will help you
Posted By: fredperim

Re: Import historical data from MT5 - 07/17/21 19:50

Hi Anissyo,
I've exported the csv from MT5 terminal as a csv file. It has a format like the following:

2020.10.16 11:24,100961.00000,100966.00000,100884.00000,100905.00000,4576,19635
2020.10.16 11:25,100910.00000,100956.00000,100874.00000,100920.00000,6292,24653
2020.10.16 11:26,100920.00000,100956.00000,100879.00000,100894.00000,4601,20388

Thank you for your support
Posted By: anissyo

Re: Import historical data from MT5 - 07/17/21 22:01

so you need to convert it to a t6 format, follow the steps:

1) Edit the script CSVtoHistory by giving to the String format the following value:

string Format = "+%Y.%m.%d %H:%M,f3,f1,f2,f4,f6";

2) save and run the script by clicking test

3) select the csv file

and then you are good to go, you will have an output of the same csv as a T6 file
© 2024 lite-C Forums