Hi
If you refer to the above table you can see Betfair prices move as follows:
in the range 2.00 to 3.00, each tick is 0.02 e.g. 2.00, 2.02, 2.04, 2.06 .....
in the range 1.01 to 2.00, each tick is 0.01 e.g. 1.50, 1.51, 1.52, 1.53 .....
if we look at your two examples:
g_ticks(2.00, 2.24) = 12 ticks
g_ticks(1.91, 1.98) = 7 ticks
so if you want to make sure the gap between best back price and best lay price is equal or less than 12 ticks:
and selections trigger expression g_ticks(back_price, lay_price) is equal or less than 12