Calculating from multiple .hst files

 

Hello everyone,


After searching for 2 full days, I decided to ask here.

What i need is to read more than one hst file and output a result in a new hst file (which will be open in offline charts).


For example, read EURUSD and GBpUSD, divide their values (open1/open2; high1/high2 etc.) and output those results in the third .hst file which will contain time,open,high,low,close,volume just as a normal .hst file. This will be calculated for, let's say, last 100 candles. Of course this result will be in fact the EURGBP pair, but I want to use this for more pairs, even 3-4 at once to get a new result. I think such indicator would be of great help, especially for arbitrage and correlations, and possibly other applications.


I have some basic programming knowledge, but i just can;t seem to get this done. So I am asking a more experienced programmer: please give me a guidance or an idea to start. I will then try to build this and post it here, cause i'm sure many will find this helpful.


Thanks in advance!

 

take a look at the source code for the "period converter" script that comes with every MT4 install, it has all the framework you need

Reason: