Need any example CSV for import - MT5

 

I am struggling to import bars in MT5 built in Bar importer

None of the bars get import even if csv is correctly formatted. So I am requesting anyone to upload any working CSV for demo which imports 1minute bar ohlc into mt5.

thanks

Documentation on MQL5: Timeseries and Indicators Access / Bars
Documentation on MQL5: Timeseries and Indicators Access / Bars
  • www.mql5.com
Bars - Timeseries and Indicators Access - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Arpit T: I am struggling to import bars in MT5 built in Bar importer. None of the bars get import even if csv is correctly formatted. So I am requesting anyone to upload any working CSV for demo which imports 1minute bar ohlc into mt5. thanks

I suggest you do the opposite. Show an example of the CSV file you are importing and show screenshots of how you are importing it, so that you can obtain some help with the process.

 

attached, thanks




Files:
 
Arpit T #: attached, thanks

Did you not notice that the all the rows are pink and not white?

Than means that the data is incorrect.

The import requires that there be 8 columns/fields of data, [DateTime], [Open], [High], [Low], [Close], [Tick Volume], [Real Volume] and [Spread] (although the tick volume can be ignored).

Your CSV file has 7 columns/fields, [Date], [Time], [Open], [High], [Low], [Close], [Volume].

Your CSV has separate fields for date and time and is in the incorrect format. It also only has one volume field and is unclear if the volume is ticks or real. And it also does not have a spread field.

Do you understand now why it is not working?

 
Fernando Carreiro #:

Did you not notice that the all the rows are pink and not white?

Than means that the data is incorrect.

The import requires that there be 8 columns/fields of data, [DateTime], [Open], [High], [Low], [Close], [Tick Volume], [Real Volume] and [Spread] (although the tick volume can be ignored).

Your CSV file has 7 columns/fields, [Date], [Time], [Open], [High], [Low], [Close], [Volume].

Your CSV has separate fields for date and time and is in the incorrect format. It also only has one volume field and is unclear if the volume is ticks or real. And it also does not have a spread field.

Do you understand now why it is not working?

I have tried all, its red because tick volume is zero, even if i add tick volume and its not red its not working

that is why i request to send me some working example of any CSV which loads some bars to test.

 i have attached new file which you may find correct and this is still not working
Files:
 
Arpit T #: I have tried all, its red because tick volume is zero, even if i add tick volume and its not red its not working. that is why i request to send me some working example of any CSV which loads some bars to test. i have attached new file which you may find correct and this is still not working

Did you not read my post?

I stated that your date and time fields an their format are incorrect and you are missing the spread.

You have for example in the first file you uploaded ...

15/12/2008;00:00;84.050655;84.175178;78.011674;81.411764;102241

It should be something like this ...

2008.12.15 00:00;84.050655;84.175178;78.011674;81.411764;0;102241;0

And for the second file, you have this ...

<DATE>  <TIME>  <OPEN>  <HIGH>  <LOW>   <CLOSE> <TICKVOL>       <VOL>   <SPREAD>
2022.09.23      07:42   0.06936348      0.06936348      0.06936348      0.06936348      0       0       10

When it should be this ...

<DATETIME>      <OPEN>  <HIGH>  <LOW>   <CLOSE> <TICKVOL>       <VOL>   <SPREAD>
2022.09.23 07:42        0.06936348      0.06936348      0.06936348      0.06936348      0       0       10
 
Fernando Carreiro #:
<DATETIME>      <OPEN>  <HIGH>  <LOW>   <CLOSE> <TICKVOL>       <VOL>   <SPREAD> 2022.09.23 07:42        0.06936348      0.06936348      0.06936348      0.06936348      0       0       10

I have tried exact as you said but it still does not work

Files:
2.csv  1 kb
 
Arpit T #: I have tried exact as you said but it still does not work

The original file you provide was TAB delimited, and the one you provided now has the tabs converted into spaces.

So it is no longer valid, nor can you use space delimitation because that would separate the date and the time again.

Use something like this instead ...

2022.09.23 07:42,0.06936348,0.06936348,0.06936348,0.06936348,1,0,10

And please do some research into what CSV or TSV files are and how they are formatted.

Also, make sure there is either tick volume or real volume to accompany the data.

EDIT: Also make sure the quotes prices are valid for the contract specifications. A price quote 0.069... is not really a valid price for the NIFTY.

 
Fernando Carreiro #:
2022.09.23 07:42,0.06936348,0.06936348,0.06936348,0.06936348,1,0,10

This did not work, see attached gif

No Bar imported. What i am asking is just any example which imports even one bar, for example.


I want to ask have you tested by importing on your MT5 and is it importing bars?

Files:
 
Arpit T #: This did not work, see attached gif. No Bar imported. What i am asking is just any example which imports even one bar, for example. I want to ask have you tested by importing on your MT5 and is it importing bars?

Your video demonstrated that it DID work — the rows were now "white" and no longer "pink".

Now close MetaTrader and open it again. Then display the chart for the symbol. However, you will not see much as there is only one single bar.

 
Also, please use the valid price quotes for the symbol. You keep ignoring certain parts of the instructions given to you.
Reason: