I am resampling OHLC for 5min candle from the tick data, and its working fine. however, I don't understand the logic for adding volume to each 5 min candle. I tried to get the maximum of "volume" from ticks during the 5 mins - but its a very large value.. the I tried to get the sum of "last_quantity" from the ticks of each 5 mins - but its too small value.
I'm comparing the 5min volume of my candle with the same period candle data from historical data.. its is nowhere near.. So, can anyone tell me the logic for calculating volume for a 5 min candle from the streaming ticks?