My Primary Program Collect Tick Data from Server and store these data in text file. Sample data in dataframe looks like below:
SYMBOL_N PRICE DATE TIME VOLUME
35324399 92.31 02/11/18 12:45:26 108856
35324399 92.32 02/11/18 12:45:26 108865
35324399 92.32 02/11/18 12:46:27 108896
35324399 92.38 02/11/18 12:46:28 108932
35324399 92.45 02/11/18 12:47:28 108988
35324399 92.48 02/11/18 12:47:30 109132
35324399 92.52 02/11/18 12:47:52 109256
35324399 92.57 02/11/18 12:48:31 109288
...
...
35324400 76.62 02/11/18 12:45:22 104569
35324400 76.66 02/11/18 12:46:33 104582
35324400 76.68 02/11/18 12:47:06 104602
35324400 76.68 02/11/18 12:47:12 104645
35324400 76.71 02/11/18 12:47:28 104724
35324400 76.74 02/11/18 12:48:29 104944
35324400 76.77 02/11/18 12:48:36 105074
35324400 76.79 02/11/18 12:48:42 106988
There are multiple tokens in the dataframe. I want to convert these data to OHLCV Candlestick for specified time frame like (1 Min, 3 Min, 5 Min). Again the Volume in OHLCV Candlestick should be the difference of Max Volume (Previous Candle - Current Candle) for the said time frame.
Please help.