Forgive me very new to this, but here is my question
Given my trade table
date | 2013.12.02
time | 12:00:09.159
sym | `MSFT
price | 38.2
volume| 300i
I can build an ohlc bar that is time sensitive like so
q)select open:first price,high:max price,low:min price,close:last price,volume:sum volume by 60 xbar time.minute from trades where time> 14:00
minute| open high low close volume
------| --------------------------------------
14:00 | 38.15 38.49 38.04 38.37 5849796
15:00 | 38.37 38.49 38.15 38.37 8491338
16:00 | 38.37 38.54 38.3498 38.533 4526692
17:00 | 38.535 38.78 38.4984 38.515 5384621
18:00 | 38.51 38.6925 38.44 38.4944 3233415
19:00 | 38.495 38.535 38.44 38.508 3591717
20:00 | 38.505 38.51 38.3401 38.455 8158938
21:00 | 38.46 38.659 38.28 38.34 6853541
22:00 | 38.34 38.45 38.34 38.39 19570
23:00 | 38.39 38.4 38.36 38.4 2580
My question is how would i build some sort of OHLC query that would take into account the grouping off of the sum of the volume? Allowing me to build bars that are based off of volume.
Thanks in advance!