Hi
I have the following 1 hour bar forex data in an access table:-
Time,Open,High,Low,Close,Volume
12.08.2013 00:00:00.000,1.33384,1.33402,1.33250,1.33259,3609. 63
12.08.2013 01:00:00.000,1.33258,1.33320,1.33236,1.33305,3011. 74
12.08.2013 02:00:00.000,1.33305,1.33310,1.33175,1.33239,4379. 66
12.08.2013 03:00:00.000,1.33239,1.33289,1.33214,1.33227,3116. 69
12.08.2013 04:00:00.000,1.33226,1.33279,1.33224,1.33262,1974. 68
12.08.2013 05:00:00.000,1.33261,1.33273,1.33216,1.33256,2764. 00
12.08.2013 06:00:00.000,1.33255,1.33332,1.33160,1.33178,6276. 07
12.08.2013 07:00:00.000,1.33179,1.33259,1.33023,1.33073,12576 .05
12.08.2013 08:00:00.000,1.33073,1.33090,1.32960,1.33079,8872. 98
12.08.2013 09:00:00.000,1.33080,1.33081,1.32870,1.32908,9744. 47
12.08.2013 10:00:00.000,1.32906,1.33024,1.32879,1.32968,9401. 39
12.08.2013 11:00:00.000,1.32969,1.32995,1.32874,1.32876,5922. 18
12.08.2013 12:00:00.000,1.32876,1.32906,1.32770,1.32889,12129 .39
The fields are 1 text, and 5 numeric
I wish to create 6 hour bar data:- such that the first two records would be..............
12.08.2013 05:00:00.000,1.33384,1.33273,1.33402,1.33175,1.332 56,18856.4
12.08.2013 11:00:00.000,1.33255,1.32995,1.33332,1.32870,1.328 76,52793.14
i.e. Time is syncr to 5, 11, 17, 23 each day
Open is Opening Price at the start of the 6 hour period
High is the maximum (of the 6 High values)
Low is the minimum (of the 6 Low Values)
Close is the Closing Price at the end of the 6 hour period
Volume is the sum (of the 6 Volume values)
Can this be achieved using a query or does one need to write a VBA script?
Thank you
Bob M