How to access past values?

 

Hi Everybody,

does anybody know a good description of how to loop through minute values in mql4, way back in time, like 10 years.

It should be done as an analysis of an indicator which means it should not be too slow.


Thanks for your help,

Jacob

 
haemse:

Hi Everybody,

does anybody know a good description of how to loop through minute values in mql4, way back in time, like 10 years.

Do you have M1 data from 10 years ago ?
 
Yes i do, or is M1 data from the Metadtrader Server not reliable? However i really need Information how to loop through past data in mt4 script! The data is stored in the data center in mt4. Does anyone know a source?
 

What do you mean by "Loop through past Data"? The data from MT Server is Not Reliable.

 
Sorry, i'm a newby, why is the Data not reliable? By Loop through i mean Access the Data in a Script and Analyse the values ...
 

Sorry, i'm a newby, why is the Data not reliable? Because there are holes and big ones by most people's estimate.

Take a look at the Period Converter codes found within the code base. There are different flavors in Script and EA versions. There are also allot of articles about data access on this site. Search google for more.

 
haemse:
Sorry, i'm a newby, why is the Data not reliable? By Loop through i mean Access the Data in a Script and Analyse the values ...
You need to read through the Documentation about TimeSeries access . . . you can get the bar number for a specific datetime using this iBarShift and then loop through decrementing to get bars before and use iOpen iClose, iHigh, iLow or Open[], Close[], High[], Low[] to get values for these bars . .
 
Thank you very much for your answers, so do I understand right? When doing market analysis you do not open the files itself, you dowoad the .hst files and then access the values through the Technical Indicator Calls like iBar etc. ??? What would you consider a good source for reliable history data?
 
haemse:
What would you consider a good source for reliable history data?
I'm using Dukascopy tick data at the moment . . . only goes back to April 2007 though. You can read up on it here: TickData
Reason: