Can you derive a 10 second candle stick from two 5 second candle sticks?

Assume we have two consecutive S5 candle sticks, C1 and C2, each with an open, high, low and close price.

Is it correct to assume that you can derive a S10 candle stick from these two S5 sticks by using these values:

Open: C1.open
High: Max(C1.high, C2.high)
Low: Min(C1.low, C2.low)
Close: C2.close

Correct, it’s just data compression.

Thanks … this means I only have to retrieve all S5 candle sticks and can derive sticks of other granularities (provided I use a multiple of 5 seconds). Saves me from retrieving and storing an enormous amount of data (at a computational cost).