Where is the history center in MT5? (Closed)

 

Good afternoon,

I am porting some Ea's to MT5 which have to be backtested in every tick mode. However, the results are wildy different from the Metatrader4 backtests.

Since tick generation is the same (https://www.mql5.com/en/articles/75) I guess I am missing the historic data, but I can't find the history center.

I am under the impression, after some dumping of variables, that I don't have the history data in my Mt5. Ticks are very separated in time.

Could you please enlighten me?

Thanks!

The Algorithm of Ticks’ Generation within the Strategy Tester of the MetaTrader 5 Terminal
The Algorithm of Ticks’ Generation within the Strategy Tester of the MetaTrader 5 Terminal
  • 2010.06.02
  • MetaQuotes Software Corp.
  • www.mql5.com
MetaTrader 5 allows us to simulate automatic trading, within an embedded strategy tester, by using Expert Advisors and the MQL5 language. This type of simulation is called testing of Expert Advisors, and can be implemented using multithreaded optimization, as well as simultaneously on a number of instruments. In order to provide a thorough testing, a generation of ticks based on the available minute history, needs to be performed. This article provides a detailed description of the algorithm, by which the ticks are generated for the historical testing in the MetaTrader 5 client terminal.
 
PzTrading:

Good afternoon,

I am porting some Ea's to MT5 which have to be backtested in every tick mode. However, the results are wildy different from the Metatrader4 backtests.

Since tick generation is the same (https://www.mql5.com/en/articles/75) I guess I am missing the historic data, but I can't find the history center.

Could you please enlighten me?

Thanks!

There is no history center with MT5. You have to use data from your broker.

 
angevoyageur:

There is no history center with MT5. You have to use data from your broker.

Thanks for your reply. Could you please expand? (ie how do you backtest tick by tick, let's say, 4 years to the past)

I don't seem to have any broker data! LOL

 
PzTrading:

Thanks for your reply. Could you please expand? (ie how do you backtest tick by tick, let's say, 4 years to the past)

I don't seem to have any broker data! LOL

If you use Metaquotes demo-server, you have enough data for most symbols. Otherwise you have to find a broker who provides enough data. Data are automatically downloaded when you run the Strategy Tester.

Please see this topic for information about the Strategy Tester.

 
angevoyageur:

If you use Metaquotes demo-server, you have enough data for most symbols. Otherwise you have to find a broker who provides enough data. Data are automatically downloaded when you run the Strategy Tester.

Please see this topic for information about the Strategy Tester.

Thanks I will try it right away and download Mt5 from mql5.com. So, theoretically, the tick-data generated is the same in Mt4 and Mt5?
 
PzTrading:
Thanks I will try it right away and download Mt5 from mql5.com. So, theoretically, the tick-data generated is the same in Mt4 and Mt5?
I think it's similar but not the same, however I don't know very well MT4 algorithm. MT4 ticks are generated on base of candle of the chosen timeframe, and MT5 ticks are always generated from M1 data.
 
angevoyageur:
I think it's similar but not the same, however I don't know very well MT4 algorithm. MT4 ticks are generated on base of candle of the chosen timeframe, and MT5 ticks are always generated from M1 data.
I see. So let me see if I get this right =P I just open an M1 chart and scroll to the past until no more data comes in?
 
PzTrading:
I see. So let me see if I get this right =P I just open an M1 chart and scroll to the past until no more data comes in?
You don't have to use an M1 chart, you can use a Monthly chart. In MT5 all charts are built from M1 data.
 
angevoyageur:
You don't have to use an M1 chart, you can use a Monthly chart. In MT5 all charts are built from M1 data.

Oh, great! Now it worked, only after I downloaded the MT5 platform from mql5.com. The tick data history is rich enough.

Results are not exactly the same, but I can work with this.

Thanks a lot for your help.

 
Alain Verleyen:
I think it's similar but not the same, however I don't know very well MT4 algorithm. MT4 ticks are generated on base of candle of the chosen timeframe, and MT5 ticks are always generated from M1 data.

So does this mean that every single "tick" generated in the Strategy Tester is actually just a M1 bar?

EDIT: I just checked and found that they are indeed individual ticks and not M1 bars (assuming you use the "Every Tick" option) .

I read on this article that price data is stored as M1 data in hcc format.

https://www.mql5.com/en/docs/series/timeseries_access

How are individual ticks generated from these M1 bars if all that is known about each M1 bar is the OHLC and volume?

Documentation on MQL5: Timeseries and Indicators Access / Organizing Data Access
Documentation on MQL5: Timeseries and Indicators Access / Organizing Data Access
  • www.mql5.com
Organizing Data Access - Timeseries and Indicators Access - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Reason: