How many bars of history can backtesting handle

 

I was hoping someone knew this answer.

How many bars (candles) of historical data can MT5 do back-testing on?


For instance on TradingView the limit is 20,000 bars.


Thank you in advance for your knowledge.

 
AquaLoco: I was hoping someone knew this answer. How many bars (candles) of historical data can MT5 do back-testing on? For instance on TradingView the limit is 20,000 bars. Thank you in advance for your knowledge.
As many as the available historical data provided by the broker. Some brokers have more and others have less.
 
AquaLoco:

I was hoping someone knew this answer.

How many bars (candles) of historical data can MT5 do back-testing on?


For instance on TradingView the limit is 20,000 bars.


Thank you in advance for your knowledge.

It's one year from the starting date of your backtest, with some special features.

Documentation on MQL5: MQL5 programs / Testing Trading Strategies
Documentation on MQL5: MQL5 programs / Testing Trading Strategies
  • www.mql5.com
Testing Trading Strategies - MQL5 programs - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 

To clarify, both answers above are valid and correct, but they answer two different aspects of back-testing.

  1. Your initial starting date for a back-test can be as far back as the broker's supplied data allows, which could be 1 year, 5 years, or even 10 years. It all depends on how much historical data the broker provides.
  2. However, the EA being tested can use functions to then access and analyse data prior to the starting date of the back-test. It is this historical data available to the EA during the test, that is limited to 1 year prior to the starting date of the test depending on various factors.
Hope that helps clarify how the two seemingly different answers are both valid.
 

Thank you both for your replies. 

From the answers you gave, it seems that if I had 1 minute historical data for the past 100 years(impossible, but just an example), Meta Traders would be able to run the EA on the data.

This would be about 52,560,000 bars.

Is this correct?

 
AquaLoco #: Thank you both for your replies. From the answers you gave, it seems that if I had 1 minute historical data for the past 100 years(impossible, but just an example), Meta Traders would be able to run the EA on the data. This would be about 52,560,000 bars. Is this correct?
The answer has already been clearly given above.
Reason: