Creating Custom Time Frames in MQL4

 

Hey Everybody...


About a year ago I read an article about creating custom time frames in indicators and/or EA's.


I was looking to read up on that topic again because one of my EA's needs to read in between the 4hr-daily time frames on the charts. I remember that it had something to do with using multiples of existing time frames in order to create a "Virtual" time frame. IE: by combining (or multiplying) two 4hr measurements, you could essentially create a functional 8hr "virtual" chart that could be read by an indicator.


Now the site is no longer there (an Interbank Forum I think), so I'm looking for help with ideas or information about how to go about this...


Any and all help would be great, and of course any positive results indeveloping this concept, will be shared !


Kevin

 
seawolf:

Hey Everybody...


About a year ago I read an article about creating custom time frames in indicators and/or EA's.


I was looking to read up on that topic again because one of my EA's needs to read in between the 4hr-daily time frames on the charts. I remember that it had something to do with using multiples of existing time frames in order to create a "Virtual" time frame. IE: by combining (or multiplying) two 4hr measurements, you could essentially create a functional 8hr "virtual" chart that could be read by an indicator.


Now the site is no longer there (an Interbank Forum I think), so I'm looking for help with ideas or information about how to go about this...


Any and all help would be great, and of course any positive results indeveloping this concept, will be shared !


Kevin

Should not be that hard if you're just talking candles, so if you wanted a 9 hour timeframe, take the highest and lowest of the last 9 x 1 hour timeframes and the open of the 9th 1 hour timeframe and the close of the last 1 hour timeframe. You might have to add up the volume etc of the last 9 x 1 hour timeframes for extra data, but once again sounds easy enough.

Reason: