Download and sheck historical Data in EA

 

HI!


My ExpertAdvisor would use historical data of 2 forex pair for calculate the entry/close signals of the trading system. One way to solve this problem is to dowload it manually but I want to do it automacelly. Is there any solution for this problem?


Thans in advance,

Roley

 
roley: My ExpertAdvisor would use historical data of 2 forex pair for calculate the entry/close signals of the trading system. One way to solve this problem is to dowload it manually but I want to do it automacelly. Is there any solution for this problem?

For live trading, both MT4 and MT5 already download data automatically, based on what your EA requests (as long as it is properly coded).

For back-testing in the Strategy Tester, MT5 already downloads Rates and Tick History automatically! On MT4, you can download bar data manually via History Center, or tick data by using 3rd party tools which also offer automation of the process.

 

whart kind of pitfalls can occur for example?

I want to use ArrayCopyRates to copy the data in an array and then use for the calculation. So the EA will automatically download the proper data after starting it?

 
roley: whart kind of pitfalls can occur for example? I want to use ArrayCopyRates to copy the data in an array and then use for the calculation. So the EA will automatically download the proper data after starting it?

Have we not already discussed this before?

Why are you asking again about the same issues for which we have already provided answers?

Any way, there are several threads on the forum on the subject, and here are a few:

Using another curreny's data in EA
Using another curreny's data in EA
  • 2017.11.07
  • www.mql5.com
Hi everybody! Is that possible to use the data of another currency in an expert advisor...
 

Thanks for the comments. One more question:


Is that possible duroig the testing trade two currency pairs? I want to test a mean reversion strategy, which sells one currency pair and at the same time it buys another one. Is that possible in the strategy tester? I tried it but I could trade only the tester's currency, for the other currency pair Igot an error message: "unknown symbol name". Is there any solution for that?

 
roley: Thanks for the comments. One more question:

Is that possible duroig the testing trade two currency pairs? I want to test a mean reversion strategy, which sells one currency pair and at the same time it buys another one. Is that possible in the strategy tester? I tried it but I could trade only the tester's currency, for the other currency pair Igot an error message: "unknown symbol name". Is there any solution for that?

In MT4 Strategy Tester, you can only trade one symbol, not multiple symbols. You can however access data from multiple symbols, but only trade one (the one being tested). Obviously, when trading live there is no such restriction, only when testing.

For testing multi-symbol trading, you will have to use MT5 Strategy Tester.

Reason: