Import External files to MT5

 

Hello,

Is it possible to import an external data file(csv or excel for example) to MT5? 

Let's say that I have csv file with data about some symbol and I want to Import it to work with it on the strategy tester, is it possible?

Thank you,

Yu.

 
yuv98:

Hello,

Is it possible to import an external data file(csv or excel for example) to MT5? 

Let's say that I have csv file with data about some symbol and I want to Import it to work with it on the strategy tester, is it possible?

Thank you,

Yu.

Hello. Yes, it's possible. Use #property tester_file

Documentation on MQL5: Language Basics / Preprocessor / Program Properties (#property)
Documentation on MQL5: Language Basics / Preprocessor / Program Properties (#property)
  • www.mql5.com
Language Basics / Preprocessor / Program Properties (#property) - Reference on algorithmic/automated trading language for MetaTrader 5
 
Alexey Kozitsyn:

Hello. Yes, it's possible. Use #property tester_file

I tried it now but it still ask me for data from broker.

I mean use external file with historical data instead of broker data(to be not connected to a broker and use external historical prices file insted of broker's data).


Thanks.

 
yuv98:
I tried it now but it still ask me for data from broker.

I mean use external file with historical data instead of broker data(to be not connected to a broker and use external historical prices file insted of broker's data).


Thanks.


Try to make a test on a custom symbol. https://www.mql5.com/en/docs/customsymbols

It's one of the last feature of the terminal.

Documentation on MQL5: Custom Symbols
Documentation on MQL5: Custom Symbols
  • www.mql5.com
Custom Symbols - Reference on algorithmic/automated trading language for MetaTrader 5
 
Alexey Kozitsyn:

Try to make a test on a custom symbol. https://www.mql5.com/en/docs/customsymbols

It's one of the last feature of the terminal.


Hi,

I tried to do it. I maked a new custom symbol and pressed on the Import bars button and chose my csv file, but somehow it doesn't show me the bars on the main screen.

I mean I click import bars and it just doesn't work, you have an idea why?

I edited the file to be in the format like in here: https://www.metatrader5.com/en/releasenotes/terminal/1459 and still not working.

Im not connected to any broker. Maybe because of that?

thank you.

MetaTrader 5 Build 1640: creating and testing custom symbols
MetaTrader 5 Build 1640: creating and testing custom symbols
  • 2017.07.21
  • MetaQuotes Software Corp.
  • www.metatrader5.com
Now it is possible to create custom financial instruments in the terminal. Using the new option, you can create any symbol, configure its settings, import your price data to the symbol and view its ch
 
yuv98:

I mean I click import bars and it just doesn't work, you have an idea why?

Unfortunately no. I haven't yet dealt with this technology.
 
Alexey Kozitsyn:
Unfortunately no. I haven't yet dealt with this technology.

That's wierd but I reinstalled the MT5 and now it's working!

Thank you!

 
yuv98:

That's wierd but I reinstalled the MT5 and now it's working!

Thank you!


Not at all.

 

I had the same issue, but I changed some columns in the file and was fixed. BUT, after I imported the bars and try to open a chart, it appears nothing. 

 
Guilherme Mendonca:

I had the same issue, but I changed some columns in the file and was fixed. BUT, after I imported the bars and try to open a chart, it appears nothing. 

Which bars (timeframe) did you import ? Which chart are you opening ?
 
Alain Verleyen:
Which bars (timeframe) did you import ? Which chart are you opening ?

1 minute.
I'm trying to open the same chart in 1 minute also.