Problem with historical data import

 

Dear all,

I am trying to import historical data (M1) to MT5 from my Tradestation account. I have export the data in csv format and below there are some rows as example:

"Date","Time","Open","High","Low","Close","TotalVolume"

1/2/2008,03:01:00,3841.00,3842.25,3840.25,3841.75,184

1/2/2008,03:02:00,3841.75,3842.75,3841.75,3842.75,83

1/2/2008,03:03:00,3843.00,3844.00,3843.00,3843.50,25

I have created a custom symbol and tried to import bars. In the import window seems all ok:

I press "OK" button and the import seems to work


But after the import if I try to plot the graph or request the bar infos no data is available.

A strage things is that in the data folder I find:

  • 1 file of 1970
  • files from 2008 to 2031!!!

I have tried to delete the 1970 file and after that I am able to plot the graph but the prices are not correct: a lot of gap and the price value not correct.

Any ideas to solve the issue?

 
Samuele Libetti: A strage things is that in the data folder I find:
  • 1 file of 1970
  • files from 2008 to 2031!!!

Probably, somewhere in your CSV data, some lines have some strange unknown values which get classified as the earliest possible datetime, which is 1 January, 1970.

Also, I find it strange that it is reading the data, because "Date" and "Time" should be a single field, not separate, in the format "yyyy.mm.dd hh:mm". This may explain the gaps and other issues.

 
Fernando Carreiro #:

Probably, somewhere in your CSV data, some lines have some strange unknown values which get classified as the earliest possible datetime, which is 1 January, 1970.

Also, I find it strange that it is reading the data, because "Date" and "Time" should be a single field, not separate, in the format "yyyy.mm.dd hh:mm". This may explain the gaps and other issues.

Hi Fernando thank for the reply. so you suggest to modify the Date field? But why MT5 is however able to recognize correctly the data (in the import window)?

 
Samuele Libetti #: Hi Fernando thank for the reply. so you suggest to modify the Date field? But why MT5 is however able to recognize correctly the data (in the import window)?

When I prepare data for a Custom Symbol, I always make sure to generate the CSV in exactly the correct field order and count, with correct fields names, and correct data format, so as to prevent any possible issues.

So, I have never once tried to feed it data formatted differently and don't know what behaviour it will have in those cases.

 
Ok I will try. Which is the correct format to use?
 
Samuele Libetti #: Ok I will try. Which is the correct format to use?

Strange, I have always used a combined date-time field believing it to be the correct format, but now while looking for the official documentation to give to you, I see that said documentation separates the date and time fields.

Now, I am the one that is confused.

Anyway, here is the link ...

Custom Financial Instruments - For Advanced Users - Trading Operations - MetaTrader 5 Help
Custom Financial Instruments - For Advanced Users - Trading Operations - MetaTrader 5 Help
  • www.metatrader5.com
The trading platform allows creating custom financial symbols. You can view charts of such symbols and perform technical analysis , as well as use...