comparing tick data by instrument for every tick

Hi, I am trying to achieve a counter of number of uptick and downtick for each instrument as and when a tick comes in.
Can anyone here guide me of how to achieve it in python.
Sign In or Register to comment.