Excel data conversion

Citizen2007

Active member
Messages
204
Likes
39
I am trying to convert 1 minute data into other timeframes using excel.

Does anybody have any experience or knowhow on how this could be done without using macros, just formulas.

Any help would be greatly appreciated.

Thanks
 
What do you have - 1 min ohlc data?

If so, lets take the example of converting that to, say, 5 min data.

Get all the OHLC data arranged into four columns (o,h,l and c obviously). I guess 5 columnsas the left hand one is gonna represent time.

Then, every 5 rows, you're gonna need a 5 min data point. So colum A is time, columns b,c,d,e re 1 min ohlc, and columns f,g,h,i are 5 min ohlc (but only populated every 5 rows as stated).

Formula for column f is to simply take the first value of column b that occurred (i.e. where the 5 min period opened).

Column g is to take the highest of the five applicable points in column c (i.e. the highest of the five highs).

column h takes the minimum of the previous five values from d (i.e. the lowest of the 5 lows). Use the MIN function.

column i is simply the latest closing value from column e (i.e. closing value of row 5).

Once you have these four data points on row 5, copy them, then select column f on every subsequent 5th row all the way to the end of your data and use Paste Special: Formulas rather than just paste.

Should do the trick. Most elegant way I can think of.

Hope that helps. Obviously if your columns aren't quite in the order I described then chop and change as appropriate, but that column order is a fairly common one for that type of data.

GJ
 
Hello GJ,

Thank you for your reply. The problem i have is the 1 minute data is updated every 1 minute, i have the last 250 bars stored at this stage, this can be increased, and would like to have a live three minute bar , 5m bar etc.
 
Are you reading data off Excel in your charting package...?...or have you got a facility of data being updated in Excel in the time frame that you want...?

You can have columns with any data with any timeframe, and on a new column you can then have AVG formulae of the time frame you need...So if you have 1 min dat in a cell....take 5 cells than average it out by a simple formula, which will become average of last 5 mins...and can be OLE'd to any charting package if needed...

Hope that is what you are after...
 
Top