Hello!
To know the difference between two prices in ticks, use this formula:
g_ticks(price1, price2)
If price1 is less than price2, the result will be positive, otherwise 0 or negative.
To know the size of the tick in the current price range of the selection, use b_tick and l_tick variables, which return the tick size for the current back and lay prices respectively.