Tick Data to 1min candlestick

Hi,

What is the best possible way to convert tick data to candlestick data on a realtime basis which matches the ohlcv values to dhan charts? Any suggestions please? And does it match or will there be a mismatch?

Hi @sachin_bhat I assume you are getting the tick data every second. You will need to aggregate the data for a specific duration, i.e. 1 min, 5 min, etc and just get the highest and lowest in that time. The first and the last tick for the time are the open and close. Volume is just the sum in the aggregate period. If you are using Dhan’s live market feed, then it should ideally match unless you have an issue in the aggregate code.