I'm working on my own data analysis using the ticks OCHLV data which I converted to 1m OCHLV records.
I'm wondering if it's possible for anyone to provide the feedback on the candlestick equations to make sure that the details below is correct.
Time Intervals:
m -> minutes; h -> hours; d -> days; w -> weeks; M -> months
Interval time formats: 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 1w, 1M
OCHLV:
O = Open
C = Close
H = High
L = Low
V = Volume
If the interval time request is 3m (3 minutes), it means that the 1m OCHLV data will pull 3 (THREE) 1m OCHLV records from database, then use the OCHLV formulas (see below) to calculate the 1m OCHLV values in order to display the 3m OCHLV values.
OCHLV Formulas: (based on n as total minutes request.)
Example: 3m = n, which n would be 3, only used for reference here.
1st 1m O + 2nd 1m O + 3rd 1m O = 3m Open
n (based on 3m)
1st 1m C + 2nd 1m C + 3rd 1m C = 3m Close
n (based on 3m)
1st 1m H + 2nd 1m H + 3rd 1m H = 3m High
n (based on 3m)
1st 1m L + 2nd 1m L + 3rd 1m L = 3m Low
n (based on 3m)
1st 1m V + 2nd 1m V + 3rd 1m V + nV = 3m Total Volume based on n minutes
Please let me know if the above information is correct.
Beyond what you asked if I was going to go to all the trouble you list in your post I would consider adding the two additional series.
A classic problem with OCHL bars is they, depending on how you are using them, are sometimes inaccurate because they "Lose" range of movement when price jumps / gaps between the Close of one bar and Open of the next.
If you want full range of movement create then create a True Range OHLC, use the same formulas use to derive "True Range".
The Open for your three minute bar is not the Open of 1m but the Close of the just previous 3m bar. This way all the range that happened since the last 3m bar will be included in this new 3m bar.