Download MetaTrader 5

Price at a certain time

To add comments, please log in or register
Edgar71
26
Edgar71  

Hi folks,


for some kind of backtesting I would like to know, if it is possible to get the price for a certain past time, including the seconds.

For example I took a trade at 4:35:42 with 5 minutes expiry on BO I would like to know the price of 4:40:42. So not the close or open, but the correct price of that specific second.

It should work on MT4...

Any ideas on this? Thanks in advance!


Edgar

honest_knave
Moderator
2295
honest_knave  

While it is possible, it is not straightforward.

MT4 doesn't store tick data, so you would have to harvest your own (i.e write the ticks to file as they come in, remembering to take care of missing ticks etc) and then use that as the data source for your backtesting.

You'd have to ask yourself if you really want all that effort. You'd have to harvest a meaningful amount of data (in real time) before you could even start to think about using it for backtesting.

Edgar71
26
Edgar71  
honest_knave:

While it is possible, it is not straightforward.

MT4 doesn't store tick data, so you would have to harvest your own (i.e write the ticks to file as they come in, remembering to take care of missing ticks etc) and then use that as the data source for your backtesting.

You'd have to ask yourself if you really want all that effort. You'd have to harvest a meaningful amount of data (in real time) before you could even start to think about using it for backtesting.

Thanks, honest_knave for your reply. Ok, then I really have to think it over. But I wonder, how the strategy-tester works with tick-data. Doesn´t he use the same historic data?

whroeder1
16353
whroeder1  
Edgar71: I wonder, how the strategy-tester works with tick-data. Doesn´t he use the same historic data?
  1. It doesn't work with tick-data. MT4 doesn't have tick data.
  2. Tester has "every-tick modeling" That means it generates ticks based on timeframes available. If you want accurate modeling, you need M1 (and higher) history covering the testing period.
Edgar71
26
Edgar71  
whroeder1:
  1. It doesn't work with tick-data. MT4 doesn't have tick data.
  2. Tester has "every-tick modeling" That means it generates ticks based on timeframes available. If you want accurate modeling, you need M1 (and higher) history covering the testing period.
Ok, thank you, whroeder1, now I got it... :-)
To add comments, please log in or register