Hi
If you are using the condition back ticks diff over time it will be impossible for it to return an accurate "value" value if the market is not formed. The best way then is to have preceding conditions to check the market is formed, for example
markets back book % is less than 105
or selections trigger expression g_ticks(back_price,lay_price) is less than x
or selections back price is greater than r_ticks(lay_price,-x)
If you are intending betting in markets with large gaps in the prices, it might be better to offer prices within the gap. For example:
best back 2.42 best lay 2.98 you could back at a price of r_ticks(lay_price,-x)