hi
the best way is to use the back book% or the lay book%, the closer to 100 the better the prices, but make it to close and you will miss lots of bets.
so the condition would be
FOR BACKING
and markets back book% is equal or less than 105 (best is 103)
FOR LAYING
and markets lay book% is equal or greater than 95 (best is 97)
mcbee