I have a a large amount of currency tick data stored in an SQL server database as well as text files.
I need this data converted into a higher time frame for creating open, high, low , close (OHLC) charts.
The program will take the data in a format of :
01/01/04 07:43:01 1.258700 1.259700
01/01/04 07:47:51 1.258500 1.259500
01/01/04 17:46:14 1.258600 1.259600
and create OHLC bars of a specified time frame. The time frames will vary from 1 min to daily.
I would like the program to work like this.
1. Read the tick data from the SQL server data base.
The table structure is as follows.
2. Process the data to form a complete bar with the OHLC and close Bid, close Ask values data structure.
Have an option to build a bar of any time frame from the following time frames.
1 min, 5 min, 15min, 30min, 1hr, 3 hr, 4hr, 1 day,
The 1 day bar will need to start at [url removed, login to view] for each day
The 3 hr bar will need a start time of 00:00
3. Once we have the complete bar save it a new table in the sql server data base with a format of PriceDateTime, O, H, L , C, Bid, Ask.
-Things to consider. There may not be a tick for each exact open or close. e,g The 1 day bar open at [url removed, login to view] but the closest tick may be 3.59am. If this is the case we need to choose the closest tick to use as the open. This may be the same for other time frames as well.
Any other questions/suggestion let me know.