Building other time frames from 1 minute time frame

 

I have been recording broker data for two years now, in the hopes that my data has a higher quality than the history download. I only recorded the 1m, 5m, 15m, 1h and 1d because that is what I use mostly. I have 2 brokers and 2 terminals per broker to record several symbols. I always suspected that it would be enough to just record the 1 minute data for testing purposes, but wasn’t sure and this way the data was always immediately available. But the newer versions seem to be real memory hogs, and now my VPS uses 80% of its memory. So it’s time to take a closer look.

If I make sure that I only have the 1 minute data in my history, my EA seems to run fine in the Strategy Tester even though it uses 1 hour data as well. But I can’t find proof anywhere that the strategy tester constructed 1 hour data from the 1 minute data. It could have downloaded it for all I know. (Using build 625 by the way.)

I read somewhere that MT5 only stores the 1 minute data and builds all other time frames from that. But as far as I know MT4 doesn’t do that. Is there anyone who could shed a little light on this?

 
burgie:

I have been recording broker data for two years now, in the hopes that my data has a higher quality than the history download. I only recorded the 1m, 5m, 15m, 1h and 1d because that is what I use mostly. I have 2 brokers and 2 terminals per broker to record several symbols. I always suspected that it would be enough to just record the 1 minute data for testing purposes, but wasn’t sure and this way the data was always immediately available. But the newer versions seem to be real memory hogs, and now my VPS uses 80% of its memory. So it’s time to take a closer look.

If I make sure that I only have the 1 minute data in my history, my EA seems to run fine in the Strategy Tester even though it uses 1 hour data as well. But I can’t find proof anywhere that the strategy tester constructed 1 hour data from the 1 minute data. It could have downloaded it for all I know. (Using build 625 by the way.)

I read somewhere that MT5 only stores the 1 minute data and builds all other time frames from that. But as far as I know MT4 doesn’t do that. Is there anyone who could shed a little light on this?


MT4 and MT5 do things very differently. As you said, MT5 uses the M1 and creates everything else from this, MT4 has .hst for each timeframe. You can use the period converter script to make any timeframe you wish from the M1 data and this is a good way to avoid data mismatch errors in the Strategy Tester.
 

Ah thanks! Didn't know that existed. Immediately showed an error in my 2012 data. If I compare the 2013 data I collected to the 2013 data I build from the 1 minute time frame, then the test results from my EA are the same. If I compare 2012 data there is a difference of 40 percentage points.

But this way storing 1 minute data is enough. Makes life a little easier :-)

 
RaptorUK:
You can use the period converter script to make any timeframe you wish from the M1 data and this is a good way to avoid data mismatch errors in the Strategy Tester.


I once had this working nicely as a indicator, now I can't even get the script to work (yes I have read the page) but my Q is even if I could get the script to work would it load each time I start MQ4 or must I reattach each time.

because thats a major PITA each day

fingers xd the answer is no, it loads automatically

 
turn it into an indicator
 
qjol:
turn it into an indicator


how do you turn a script into an indicator?

 
 

god why do you bother posting, remarkably unhelpful.

 
pgtips:

god why do you bother posting, remarkably unhelpful.


Creation of Custom Indicators
Reason: